//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension LexModelsV2 {
    // MARK: Enums

    public enum AggregatedUtterancesFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case utterance = "Utterance"
        public var description: String { return self.rawValue }
    }

    public enum AggregatedUtterancesFilterOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case contains = "CO"
        case equals = "EQ"
        public var description: String { return self.rawValue }
    }

    public enum AggregatedUtterancesSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case hitCount = "HitCount"
        case missedCount = "MissedCount"
        public var description: String { return self.rawValue }
    }

    public enum AssociatedTranscriptFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case intentId = "IntentId"
        case slotTypeId = "SlotTypeId"
        public var description: String { return self.rawValue }
    }

    public enum AudioRecognitionStrategy: String, CustomStringConvertible, Codable, _SotoSendable {
        case useSlotValuesAsCustomVocabulary = "UseSlotValuesAsCustomVocabulary"
        public var description: String { return self.rawValue }
    }

    public enum BotAliasStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case available = "Available"
        case creating = "Creating"
        case deleting = "Deleting"
        case failed = "Failed"
        public var description: String { return self.rawValue }
    }

    public enum BotFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case botName = "BotName"
        public var description: String { return self.rawValue }
    }

    public enum BotFilterOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case contains = "CO"
        case equals = "EQ"
        public var description: String { return self.rawValue }
    }

    public enum BotLocaleFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case botLocaleName = "BotLocaleName"
        public var description: String { return self.rawValue }
    }

    public enum BotLocaleFilterOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case contains = "CO"
        case equals = "EQ"
        public var description: String { return self.rawValue }
    }

    public enum BotLocaleSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case botLocaleName = "BotLocaleName"
        public var description: String { return self.rawValue }
    }

    public enum BotLocaleStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case building = "Building"
        case built = "Built"
        case creating = "Creating"
        case deleting = "Deleting"
        case failed = "Failed"
        case importing = "Importing"
        case notBuilt = "NotBuilt"
        case processing = "Processing"
        case readyExpressTesting = "ReadyExpressTesting"
        public var description: String { return self.rawValue }
    }

    public enum BotRecommendationStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case available = "Available"
        case deleted = "Deleted"
        case deleting = "Deleting"
        case downloading = "Downloading"
        case failed = "Failed"
        case processing = "Processing"
        case stopped = "Stopped"
        case stopping = "Stopping"
        case updating = "Updating"
        public var description: String { return self.rawValue }
    }

    public enum BotSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case botName = "BotName"
        public var description: String { return self.rawValue }
    }

    public enum BotStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case available = "Available"
        case creating = "Creating"
        case deleting = "Deleting"
        case failed = "Failed"
        case importing = "Importing"
        case inactive = "Inactive"
        case versioning = "Versioning"
        public var description: String { return self.rawValue }
    }

    public enum BotVersionSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case botVersion = "BotVersion"
        public var description: String { return self.rawValue }
    }

    public enum BuiltInIntentSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case intentSignature = "IntentSignature"
        public var description: String { return self.rawValue }
    }

    public enum BuiltInSlotTypeSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case slotTypeSignature = "SlotTypeSignature"
        public var description: String { return self.rawValue }
    }

    public enum CustomVocabularyStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case creating = "Creating"
        case deleting = "Deleting"
        case exporting = "Exporting"
        case importing = "Importing"
        case ready = "Ready"
        public var description: String { return self.rawValue }
    }

    public enum DialogActionType: String, CustomStringConvertible, Codable, _SotoSendable {
        case closeIntent = "CloseIntent"
        case confirmIntent = "ConfirmIntent"
        case elicitIntent = "ElicitIntent"
        case elicitSlot = "ElicitSlot"
        case endConversation = "EndConversation"
        case evaluateConditional = "EvaluateConditional"
        case fulfillIntent = "FulfillIntent"
        case invokeDialogCodeHook = "InvokeDialogCodeHook"
        case startIntent = "StartIntent"
        public var description: String { return self.rawValue }
    }

    public enum Effect: String, CustomStringConvertible, Codable, _SotoSendable {
        case allow = "Allow"
        case deny = "Deny"
        public var description: String { return self.rawValue }
    }

    public enum ErrorCode: String, CustomStringConvertible, Codable, _SotoSendable {
        case duplicateInput = "DUPLICATE_INPUT"
        case internalServerFailure = "INTERNAL_SERVER_FAILURE"
        case resourceAlreadyExists = "RESOURCE_ALREADY_EXISTS"
        case resourceDoesNotExist = "RESOURCE_DOES_NOT_EXIST"
        public var description: String { return self.rawValue }
    }

    public enum ExportFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case exportResourceType = "ExportResourceType"
        public var description: String { return self.rawValue }
    }

    public enum ExportFilterOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case contains = "CO"
        case equals = "EQ"
        public var description: String { return self.rawValue }
    }

    public enum ExportSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case lastUpdatedDateTime = "LastUpdatedDateTime"
        public var description: String { return self.rawValue }
    }

    public enum ExportStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case completed = "Completed"
        case deleting = "Deleting"
        case failed = "Failed"
        case inProgress = "InProgress"
        public var description: String { return self.rawValue }
    }

    public enum ImportExportFileFormat: String, CustomStringConvertible, Codable, _SotoSendable {
        case lexJson = "LexJson"
        case tsv = "TSV"
        public var description: String { return self.rawValue }
    }

    public enum ImportFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case importResourceType = "ImportResourceType"
        public var description: String { return self.rawValue }
    }

    public enum ImportFilterOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case contains = "CO"
        case equals = "EQ"
        public var description: String { return self.rawValue }
    }

    public enum ImportResourceType: String, CustomStringConvertible, Codable, _SotoSendable {
        case bot = "Bot"
        case botLocale = "BotLocale"
        case customVocabulary = "CustomVocabulary"
        public var description: String { return self.rawValue }
    }

    public enum ImportSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case lastUpdatedDateTime = "LastUpdatedDateTime"
        public var description: String { return self.rawValue }
    }

    public enum ImportStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case completed = "Completed"
        case deleting = "Deleting"
        case failed = "Failed"
        case inProgress = "InProgress"
        public var description: String { return self.rawValue }
    }

    public enum IntentFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case intentName = "IntentName"
        public var description: String { return self.rawValue }
    }

    public enum IntentFilterOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case contains = "CO"
        case equals = "EQ"
        public var description: String { return self.rawValue }
    }

    public enum IntentSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case intentName = "IntentName"
        case lastUpdatedDateTime = "LastUpdatedDateTime"
        public var description: String { return self.rawValue }
    }

    public enum MergeStrategy: String, CustomStringConvertible, Codable, _SotoSendable {
        case append = "Append"
        case failOnConflict = "FailOnConflict"
        case overwrite = "Overwrite"
        public var description: String { return self.rawValue }
    }

    public enum MessageSelectionStrategy: String, CustomStringConvertible, Codable, _SotoSendable {
        case ordered = "Ordered"
        case random = "Random"
        public var description: String { return self.rawValue }
    }

    public enum ObfuscationSettingType: String, CustomStringConvertible, Codable, _SotoSendable {
        case defaultObfuscation = "DefaultObfuscation"
        case none = "None"
        public var description: String { return self.rawValue }
    }

    public enum PromptAttempt: String, CustomStringConvertible, Codable, _SotoSendable {
        case initial = "Initial"
        case retry1 = "Retry1"
        case retry2 = "Retry2"
        case retry3 = "Retry3"
        case retry4 = "Retry4"
        case retry5 = "Retry5"
        public var description: String { return self.rawValue }
    }

    public enum SearchOrder: String, CustomStringConvertible, Codable, _SotoSendable {
        case ascending = "Ascending"
        case descending = "Descending"
        public var description: String { return self.rawValue }
    }

    public enum SlotConstraint: String, CustomStringConvertible, Codable, _SotoSendable {
        case optional = "Optional"
        case required = "Required"
        public var description: String { return self.rawValue }
    }

    public enum SlotFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case slotName = "SlotName"
        public var description: String { return self.rawValue }
    }

    public enum SlotFilterOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case contains = "CO"
        case equals = "EQ"
        public var description: String { return self.rawValue }
    }

    public enum SlotShape: String, CustomStringConvertible, Codable, _SotoSendable {
        case list = "List"
        case scalar = "Scalar"
        public var description: String { return self.rawValue }
    }

    public enum SlotSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case lastUpdatedDateTime = "LastUpdatedDateTime"
        case slotName = "SlotName"
        public var description: String { return self.rawValue }
    }

    public enum SlotTypeCategory: String, CustomStringConvertible, Codable, _SotoSendable {
        case composite = "Composite"
        case custom = "Custom"
        case extended = "Extended"
        case externalGrammar = "ExternalGrammar"
        public var description: String { return self.rawValue }
    }

    public enum SlotTypeFilterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case externalSourceType = "ExternalSourceType"
        case slotTypeName = "SlotTypeName"
        public var description: String { return self.rawValue }
    }

    public enum SlotTypeFilterOperator: String, CustomStringConvertible, Codable, _SotoSendable {
        case contains = "CO"
        case equals = "EQ"
        public var description: String { return self.rawValue }
    }

    public enum SlotTypeSortAttribute: String, CustomStringConvertible, Codable, _SotoSendable {
        case lastUpdatedDateTime = "LastUpdatedDateTime"
        case slotTypeName = "SlotTypeName"
        public var description: String { return self.rawValue }
    }

    public enum SlotValueResolutionStrategy: String, CustomStringConvertible, Codable, _SotoSendable {
        case concatenation = "Concatenation"
        case originalValue = "OriginalValue"
        case topResolution = "TopResolution"
        public var description: String { return self.rawValue }
    }

    public enum SortOrder: String, CustomStringConvertible, Codable, _SotoSendable {
        case ascending = "Ascending"
        case descending = "Descending"
        public var description: String { return self.rawValue }
    }

    public enum TimeDimension: String, CustomStringConvertible, Codable, _SotoSendable {
        case days = "Days"
        case hours = "Hours"
        case weeks = "Weeks"
        public var description: String { return self.rawValue }
    }

    public enum TranscriptFormat: String, CustomStringConvertible, Codable, _SotoSendable {
        case lex = "Lex"
        public var description: String { return self.rawValue }
    }

    public enum VoiceEngine: String, CustomStringConvertible, Codable, _SotoSendable {
        case neural
        case standard
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AdvancedRecognitionSetting: AWSEncodableShape & AWSDecodableShape {
        /// Enables using the slot values as a custom vocabulary for recognizing user utterances.
        public let audioRecognitionStrategy: AudioRecognitionStrategy?

        public init(audioRecognitionStrategy: AudioRecognitionStrategy? = nil) {
            self.audioRecognitionStrategy = audioRecognitionStrategy
        }

        private enum CodingKeys: String, CodingKey {
            case audioRecognitionStrategy
        }
    }

    public struct AggregatedUtterancesFilter: AWSEncodableShape {
        /// The name of the field to filter the utterance list.
        public let name: AggregatedUtterancesFilterName
        /// The operator to use for the filter. Specify EQ when the ListAggregatedUtterances operation should return only utterances that equal the specified value. Specify CO when the ListAggregatedUtterances operation should return utterances that contain the specified value.
        public let `operator`: AggregatedUtterancesFilterOperator
        /// The value to use for filtering the list of bots.
        public let values: [String]

        public init(name: AggregatedUtterancesFilterName, operator: AggregatedUtterancesFilterOperator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 100)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_()\\s-]+$")
            }
            try self.validate(self.values, name: "values", parent: name, max: 1)
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case `operator`
            case values
        }
    }

    public struct AggregatedUtterancesSortBy: AWSEncodableShape {
        /// The utterance attribute to sort by.
        public let attribute: AggregatedUtterancesSortAttribute
        /// Specifies whether to sort the aggregated utterances in ascending or descending order.
        public let order: SortOrder

        public init(attribute: AggregatedUtterancesSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct AggregatedUtterancesSummary: AWSDecodableShape {
        /// Aggregated utterance data may contain utterances from versions of your bot that have since been deleted. When the aggregated contains this kind of data, this field is set to true.
        public let containsDataFromDeletedResources: Bool?
        /// The number of times that the utterance was detected by Amazon Lex during the time period. When an utterance is detected, it activates an intent or a slot.
        public let hitCount: Int?
        /// The number of times that the utterance was missed by Amazon Lex An utterance is missed when it doesn't activate an intent or slot.
        public let missedCount: Int?
        /// The text of the utterance. If the utterance was used with the RecognizeUtterance operation, the text is the transcription of the audio utterance.
        public let utterance: String?
        /// The date and time that the utterance was first recorded in the time window for aggregation. An utterance may have been sent to Amazon Lex before that time, but only utterances within the time window are counted.
        public let utteranceFirstRecordedInAggregationDuration: Date?
        /// The last date and time that an utterance was recorded in the time window for aggregation. An utterance may be sent to Amazon Lex after that time, but only utterances within the time window are counted.
        public let utteranceLastRecordedInAggregationDuration: Date?

        public init(containsDataFromDeletedResources: Bool? = nil, hitCount: Int? = nil, missedCount: Int? = nil, utterance: String? = nil, utteranceFirstRecordedInAggregationDuration: Date? = nil, utteranceLastRecordedInAggregationDuration: Date? = nil) {
            self.containsDataFromDeletedResources = containsDataFromDeletedResources
            self.hitCount = hitCount
            self.missedCount = missedCount
            self.utterance = utterance
            self.utteranceFirstRecordedInAggregationDuration = utteranceFirstRecordedInAggregationDuration
            self.utteranceLastRecordedInAggregationDuration = utteranceLastRecordedInAggregationDuration
        }

        private enum CodingKeys: String, CodingKey {
            case containsDataFromDeletedResources
            case hitCount
            case missedCount
            case utterance
            case utteranceFirstRecordedInAggregationDuration
            case utteranceLastRecordedInAggregationDuration
        }
    }

    public struct AllowedInputTypes: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether audio input is allowed.
        public let allowAudioInput: Bool
        /// Indicates whether DTMF input is allowed.
        public let allowDTMFInput: Bool

        public init(allowAudioInput: Bool, allowDTMFInput: Bool) {
            self.allowAudioInput = allowAudioInput
            self.allowDTMFInput = allowDTMFInput
        }

        private enum CodingKeys: String, CodingKey {
            case allowAudioInput
            case allowDTMFInput
        }
    }

    public struct AssociatedTranscript: AWSDecodableShape {
        /// The content of the transcript that meets the search filter criteria. For the JSON format of the transcript, see Output transcript format.
        public let transcript: String?

        public init(transcript: String? = nil) {
            self.transcript = transcript
        }

        private enum CodingKeys: String, CodingKey {
            case transcript
        }
    }

    public struct AssociatedTranscriptFilter: AWSEncodableShape {
        /// The name of the field to use for filtering. The allowed names are IntentId and SlotTypeId.
        public let name: AssociatedTranscriptFilterName
        /// The values to use to filter the transcript.
        public let values: [String]

        public init(name: AssociatedTranscriptFilterName, values: [String]) {
            self.name = name
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 100)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_()\\s-]+$")
            }
            try self.validate(self.values, name: "values", parent: name, max: 1)
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case values
        }
    }

    public struct AudioAndDTMFInputSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the settings on audio input.
        public let audioSpecification: AudioSpecification?
        /// Specifies the settings on DTMF input.
        public let dtmfSpecification: DTMFSpecification?
        /// Time for which a bot waits before assuming that the customer isn't going to speak or press  a key. This timeout is shared between Audio and DTMF inputs.
        public let startTimeoutMs: Int

        public init(audioSpecification: AudioSpecification? = nil, dtmfSpecification: DTMFSpecification? = nil, startTimeoutMs: Int) {
            self.audioSpecification = audioSpecification
            self.dtmfSpecification = dtmfSpecification
            self.startTimeoutMs = startTimeoutMs
        }

        public func validate(name: String) throws {
            try self.audioSpecification?.validate(name: "\(name).audioSpecification")
            try self.dtmfSpecification?.validate(name: "\(name).dtmfSpecification")
            try self.validate(self.startTimeoutMs, name: "startTimeoutMs", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case audioSpecification
            case dtmfSpecification
            case startTimeoutMs
        }
    }

    public struct AudioLogDestination: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon S3 bucket where the audio log files are stored. The IAM role specified in the roleArn parameter of the CreateBot operation must have permission to write to this bucket.
        public let s3Bucket: S3BucketLogDestination

        public init(s3Bucket: S3BucketLogDestination) {
            self.s3Bucket = s3Bucket
        }

        public func validate(name: String) throws {
            try self.s3Bucket.validate(name: "\(name).s3Bucket")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Bucket
        }
    }

    public struct AudioLogSetting: AWSEncodableShape & AWSDecodableShape {
        public let destination: AudioLogDestination
        /// Determines whether audio logging in enabled for the bot.
        public let enabled: Bool

        public init(destination: AudioLogDestination, enabled: Bool) {
            self.destination = destination
            self.enabled = enabled
        }

        public func validate(name: String) throws {
            try self.destination.validate(name: "\(name).destination")
        }

        private enum CodingKeys: String, CodingKey {
            case destination
            case enabled
        }
    }

    public struct AudioSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Time for which a bot waits after the customer stops speaking to assume the  utterance is finished.
        public let endTimeoutMs: Int
        /// Time for how long Amazon Lex waits before speech input is truncated and the speech  is returned to application.
        public let maxLengthMs: Int

        public init(endTimeoutMs: Int, maxLengthMs: Int) {
            self.endTimeoutMs = endTimeoutMs
            self.maxLengthMs = maxLengthMs
        }

        public func validate(name: String) throws {
            try self.validate(self.endTimeoutMs, name: "endTimeoutMs", parent: name, min: 1)
            try self.validate(self.maxLengthMs, name: "maxLengthMs", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case endTimeoutMs
            case maxLengthMs
        }
    }

    public struct BatchCreateCustomVocabularyItemRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot to batch create the custom vocabulary item for.
        public let botId: String
        /// The bot version of the bot to batch create the custom vocabulary item for.
        public let botVersion: String
        /// The custom vocabulary item list of the bot to batch create the custom vocabulary item for.
        public let customVocabularyItemList: [NewCustomVocabularyItem]
        /// The unique locale identifier of the bot to batch create the custom vocabulary item for.
        public let localeId: String

        public init(botId: String, botVersion: String, customVocabularyItemList: [NewCustomVocabularyItem], localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.customVocabularyItemList = customVocabularyItemList
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.customVocabularyItemList.forEach {
                try $0.validate(name: "\(name).customVocabularyItemList[]")
            }
            try self.validate(self.customVocabularyItemList, name: "customVocabularyItemList", parent: name, max: 10)
            try self.validate(self.customVocabularyItemList, name: "customVocabularyItemList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case customVocabularyItemList
        }
    }

    public struct BatchCreateCustomVocabularyItemResponse: AWSDecodableShape {
        /// The unique identifier of the bot to batch create response for the custom vocabulary item.
        public let botId: String?
        /// The bot version of the bot to batch create the custom vocabulary item response for.
        public let botVersion: String?
        /// The errors of the action to batch create the custom vocabulary item response for a bot.
        public let errors: [FailedCustomVocabularyItem]?
        /// The unique locale identifier of the bot to batch create the custom vocabulary item response for.
        public let localeId: String?
        /// The resources of the action to batch create the custom vocabulary item response for a bot.
        public let resources: [CustomVocabularyItem]?

        public init(botId: String? = nil, botVersion: String? = nil, errors: [FailedCustomVocabularyItem]? = nil, localeId: String? = nil, resources: [CustomVocabularyItem]? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.errors = errors
            self.localeId = localeId
            self.resources = resources
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case errors
            case localeId
            case resources
        }
    }

    public struct BatchDeleteCustomVocabularyItemRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot to batch delete request for the custom vocabulary item.
        public let botId: String
        /// The version of the bot to batch delete request for the custom vocabulary item.
        public let botVersion: String
        /// The custom vocabulary list to batch delete request for the custom vocabulary item.
        public let customVocabularyItemList: [CustomVocabularyEntryId]
        /// The locale identifier of the bot to batch delete request for the custom vocabulary item.
        public let localeId: String

        public init(botId: String, botVersion: String, customVocabularyItemList: [CustomVocabularyEntryId], localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.customVocabularyItemList = customVocabularyItemList
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.customVocabularyItemList.forEach {
                try $0.validate(name: "\(name).customVocabularyItemList[]")
            }
            try self.validate(self.customVocabularyItemList, name: "customVocabularyItemList", parent: name, max: 10)
            try self.validate(self.customVocabularyItemList, name: "customVocabularyItemList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case customVocabularyItemList
        }
    }

    public struct BatchDeleteCustomVocabularyItemResponse: AWSDecodableShape {
        /// The unique identifier of the bot to batch delete response for the custom vocabulary item.
        public let botId: String?
        /// The version of the bot to batch delete response for the custom vocabulary item.
        public let botVersion: String?
        /// The errors of the action to batch delete response for the custom vocabulary item.
        public let errors: [FailedCustomVocabularyItem]?
        /// The locale identifier of the bot to batch delete response for the custom vocabulary item.
        public let localeId: String?
        /// The resources of the action to batch delete response for the custom vocabulary item.
        public let resources: [CustomVocabularyItem]?

        public init(botId: String? = nil, botVersion: String? = nil, errors: [FailedCustomVocabularyItem]? = nil, localeId: String? = nil, resources: [CustomVocabularyItem]? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.errors = errors
            self.localeId = localeId
            self.resources = resources
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case errors
            case localeId
            case resources
        }
    }

    public struct BatchUpdateCustomVocabularyItemRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot to the batch update request for the custom vocabulary item.
        public let botId: String
        /// The bot version of the bot to the batch update request for the custom vocabulary item.
        public let botVersion: String
        /// The custom vocabulary item list of the bot to the batch update request for the custom vocabulary item.
        public let customVocabularyItemList: [CustomVocabularyItem]
        /// The locale identifier of the bot to the batch update request for the custom vocabulary item.
        public let localeId: String

        public init(botId: String, botVersion: String, customVocabularyItemList: [CustomVocabularyItem], localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.customVocabularyItemList = customVocabularyItemList
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.customVocabularyItemList.forEach {
                try $0.validate(name: "\(name).customVocabularyItemList[]")
            }
            try self.validate(self.customVocabularyItemList, name: "customVocabularyItemList", parent: name, max: 10)
            try self.validate(self.customVocabularyItemList, name: "customVocabularyItemList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case customVocabularyItemList
        }
    }

    public struct BatchUpdateCustomVocabularyItemResponse: AWSDecodableShape {
        /// The unique identifier of the bot to the batch update response for the custom vocabulary item.
        public let botId: String?
        /// The bot version of the bot to the batch update response for the custom vocabulary item.
        public let botVersion: String?
        /// The errors of the action to batch update response for the custom vocabulary item.
        public let errors: [FailedCustomVocabularyItem]?
        /// The locale identifier of the bot to the batch update response for the custom vocabulary item.
        public let localeId: String?
        /// The resources of the action to batch update response for the custom vocabulary item.
        public let resources: [CustomVocabularyItem]?

        public init(botId: String? = nil, botVersion: String? = nil, errors: [FailedCustomVocabularyItem]? = nil, localeId: String? = nil, resources: [CustomVocabularyItem]? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.errors = errors
            self.localeId = localeId
            self.resources = resources
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case errors
            case localeId
            case resources
        }
    }

    public struct BotAliasHistoryEvent: AWSDecodableShape {
        /// The version of the bot that was used in the event.
        public let botVersion: String?
        /// The date and time that the event ended.
        public let endDate: Date?
        /// The date and time that the event started.
        public let startDate: Date?

        public init(botVersion: String? = nil, endDate: Date? = nil, startDate: Date? = nil) {
            self.botVersion = botVersion
            self.endDate = endDate
            self.startDate = startDate
        }

        private enum CodingKeys: String, CodingKey {
            case botVersion
            case endDate
            case startDate
        }
    }

    public struct BotAliasLocaleSettings: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the Lambda function that should be used in the locale.
        public let codeHookSpecification: CodeHookSpecification?
        /// Determines whether the locale is enabled for the bot. If the value is false, the locale isn't available for use.
        public let enabled: Bool

        public init(codeHookSpecification: CodeHookSpecification? = nil, enabled: Bool) {
            self.codeHookSpecification = codeHookSpecification
            self.enabled = enabled
        }

        public func validate(name: String) throws {
            try self.codeHookSpecification?.validate(name: "\(name).codeHookSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case codeHookSpecification
            case enabled
        }
    }

    public struct BotAliasSummary: AWSDecodableShape {
        /// The unique identifier assigned to the bot alias. You can use this ID to get detailed information about the alias using the DescribeBotAlias operation.
        public let botAliasId: String?
        /// The name of the bot alias.
        public let botAliasName: String?
        /// The current state of the bot alias. If the status is Available, the alias is ready for use.
        public let botAliasStatus: BotAliasStatus?
        /// The version of the bot that the bot alias references.
        public let botVersion: String?
        /// A timestamp of the date and time that the bot alias was created.
        public let creationDateTime: Date?
        /// The description of the bot alias.
        public let description: String?
        /// A timestamp of the date and time that the bot alias was last updated.
        public let lastUpdatedDateTime: Date?

        public init(botAliasId: String? = nil, botAliasName: String? = nil, botAliasStatus: BotAliasStatus? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil, lastUpdatedDateTime: Date? = nil) {
            self.botAliasId = botAliasId
            self.botAliasName = botAliasName
            self.botAliasStatus = botAliasStatus
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
            self.lastUpdatedDateTime = lastUpdatedDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case botAliasId
            case botAliasName
            case botAliasStatus
            case botVersion
            case creationDateTime
            case description
            case lastUpdatedDateTime
        }
    }

    public struct BotExportSpecification: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the bot assigned by Amazon Lex.
        public let botId: String
        /// The version of the bot that was exported. This will be either DRAFT or the version number.
        public let botVersion: String

        public init(botId: String, botVersion: String) {
            self.botId = botId
            self.botVersion = botVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
        }
    }

    public struct BotFilter: AWSEncodableShape {
        /// The name of the field to filter the list of bots.
        public let name: BotFilterName
        /// The operator to use for the filter. Specify EQ when the ListBots operation should return only aliases that equal the specified value. Specify CO when the ListBots operation should return aliases that contain the specified value.
        public let `operator`: BotFilterOperator
        /// The value to use for filtering the list of bots.
        public let values: [String]

        public init(name: BotFilterName, operator: BotFilterOperator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 100)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_()\\s-]+$")
            }
            try self.validate(self.values, name: "values", parent: name, max: 1)
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case `operator`
            case values
        }
    }

    public struct BotImportSpecification: AWSEncodableShape & AWSDecodableShape {
        /// The name that Amazon Lex should use for the bot.
        public let botName: String
        /// A list of tags to add to the bot. You can only add tags when you import a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.
        public let botTags: [String: String]?
        public let dataPrivacy: DataPrivacy
        /// The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.  A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout. You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.
        public let idleSessionTTLInSeconds: Int?
        /// The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.
        public let roleArn: String
        /// A list of tags to add to the test alias for a bot. You can only add tags when you import a bot. You can't use the UpdateAlias operation to update tags. To update tags on the test alias, use the TagResource operation.
        public let testBotAliasTags: [String: String]?

        public init(botName: String, botTags: [String: String]? = nil, dataPrivacy: DataPrivacy, idleSessionTTLInSeconds: Int? = nil, roleArn: String, testBotAliasTags: [String: String]? = nil) {
            self.botName = botName
            self.botTags = botTags
            self.dataPrivacy = dataPrivacy
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.roleArn = roleArn
            self.testBotAliasTags = testBotAliasTags
        }

        public func validate(name: String) throws {
            try self.validate(self.botName, name: "botName", parent: name, max: 100)
            try self.validate(self.botName, name: "botName", parent: name, min: 1)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.botTags?.forEach {
                try validate($0.key, name: "botTags.key", parent: name, max: 128)
                try validate($0.key, name: "botTags.key", parent: name, min: 1)
                try validate($0.value, name: "botTags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.botTags, name: "botTags", parent: name, max: 200)
            try self.validate(self.idleSessionTTLInSeconds, name: "idleSessionTTLInSeconds", parent: name, max: 86400)
            try self.validate(self.idleSessionTTLInSeconds, name: "idleSessionTTLInSeconds", parent: name, min: 60)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 32)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws:iam::[0-9]{12}:role/.*$")
            try self.testBotAliasTags?.forEach {
                try validate($0.key, name: "testBotAliasTags.key", parent: name, max: 128)
                try validate($0.key, name: "testBotAliasTags.key", parent: name, min: 1)
                try validate($0.value, name: "testBotAliasTags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.testBotAliasTags, name: "testBotAliasTags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case botName
            case botTags
            case dataPrivacy
            case idleSessionTTLInSeconds
            case roleArn
            case testBotAliasTags
        }
    }

    public struct BotLocaleExportSpecification: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the bot to create the locale for.
        public let botId: String
        /// The version of the bot to export.
        public let botVersion: String
        /// The identifier of the language and locale to export. The string must match one of the locales in the bot.
        public let localeId: String

        public init(botId: String, botVersion: String, localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case localeId
        }
    }

    public struct BotLocaleFilter: AWSEncodableShape {
        /// The name of the field to filter the list of bots.
        public let name: BotLocaleFilterName
        /// The operator to use for the filter. Specify EQ when the ListBotLocales operation should return only aliases that equal the specified value. Specify CO when the ListBotLocales operation should return aliases that contain the specified value.
        public let `operator`: BotLocaleFilterOperator
        /// The value to use for filtering the list of bots.
        public let values: [String]

        public init(name: BotLocaleFilterName, operator: BotLocaleFilterOperator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 100)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_()\\s-]+$")
            }
            try self.validate(self.values, name: "values", parent: name, max: 1)
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case `operator`
            case values
        }
    }

    public struct BotLocaleHistoryEvent: AWSDecodableShape {
        /// A description of the event that occurred.
        public let event: String
        /// A timestamp of the date and time that the event occurred.
        public let eventDate: Date

        public init(event: String, eventDate: Date) {
            self.event = event
            self.eventDate = eventDate
        }

        private enum CodingKeys: String, CodingKey {
            case event
            case eventDate
        }
    }

    public struct BotLocaleImportSpecification: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the bot to import the locale to.
        public let botId: String
        /// The version of the bot to import the locale to. This can only be the DRAFT version of the bot.
        public let botVersion: String
        /// The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages.
        public let localeId: String
        /// Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot.  For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the PostText operation would be:    AMAZON.FallbackIntent     IntentA     IntentB     IntentC
        public let nluIntentConfidenceThreshold: Double?
        public let voiceSettings: VoiceSettings?

        public init(botId: String, botVersion: String, localeId: String, nluIntentConfidenceThreshold: Double? = nil, voiceSettings: VoiceSettings? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
            self.nluIntentConfidenceThreshold = nluIntentConfidenceThreshold
            self.voiceSettings = voiceSettings
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.nluIntentConfidenceThreshold, name: "nluIntentConfidenceThreshold", parent: name, max: 1.0)
            try self.validate(self.nluIntentConfidenceThreshold, name: "nluIntentConfidenceThreshold", parent: name, min: 0.0)
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case localeId
            case nluIntentConfidenceThreshold
            case voiceSettings
        }
    }

    public struct BotLocaleSortBy: AWSEncodableShape {
        /// The bot locale attribute to sort by.
        public let attribute: BotLocaleSortAttribute
        /// Specifies whether to sort the bot locales in ascending or descending order.
        public let order: SortOrder

        public init(attribute: BotLocaleSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct BotLocaleSummary: AWSDecodableShape {
        /// The current status of the bot locale. When the status is Built the locale is ready for use.
        public let botLocaleStatus: BotLocaleStatus?
        /// The description of the bot locale.
        public let description: String?
        /// A timestamp of the date and time that the bot locale was last built.
        public let lastBuildSubmittedDateTime: Date?
        /// A timestamp of the date and time that the bot locale was last updated.
        public let lastUpdatedDateTime: Date?
        /// The language and locale of the bot locale.
        public let localeId: String?
        /// The name of the bot locale.
        public let localeName: String?

        public init(botLocaleStatus: BotLocaleStatus? = nil, description: String? = nil, lastBuildSubmittedDateTime: Date? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, localeName: String? = nil) {
            self.botLocaleStatus = botLocaleStatus
            self.description = description
            self.lastBuildSubmittedDateTime = lastBuildSubmittedDateTime
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.localeName = localeName
        }

        private enum CodingKeys: String, CodingKey {
            case botLocaleStatus
            case description
            case lastBuildSubmittedDateTime
            case lastUpdatedDateTime
            case localeId
            case localeName
        }
    }

    public struct BotRecommendationResultStatistics: AWSDecodableShape {
        /// Statistical information about about the intents associated with the bot recommendation results.
        public let intents: IntentStatistics?
        /// Statistical information about the slot types associated with the bot recommendation results.
        public let slotTypes: SlotTypeStatistics?

        public init(intents: IntentStatistics? = nil, slotTypes: SlotTypeStatistics? = nil) {
            self.intents = intents
            self.slotTypes = slotTypes
        }

        private enum CodingKeys: String, CodingKey {
            case intents
            case slotTypes
        }
    }

    public struct BotRecommendationResults: AWSDecodableShape {
        /// The presigned url link of the associated transcript.
        public let associatedTranscriptsUrl: String?
        /// The presigned URL link of the recommended bot definition.
        public let botLocaleExportUrl: String?
        /// The statistical summary of the bot recommendation results.
        public let statistics: BotRecommendationResultStatistics?

        public init(associatedTranscriptsUrl: String? = nil, botLocaleExportUrl: String? = nil, statistics: BotRecommendationResultStatistics? = nil) {
            self.associatedTranscriptsUrl = associatedTranscriptsUrl
            self.botLocaleExportUrl = botLocaleExportUrl
            self.statistics = statistics
        }

        private enum CodingKeys: String, CodingKey {
            case associatedTranscriptsUrl
            case botLocaleExportUrl
            case statistics
        }
    }

    public struct BotRecommendationSummary: AWSDecodableShape {
        /// The unique identifier of the bot recommendation to be updated.
        public let botRecommendationId: String
        /// The status of the bot recommendation. If the status is Failed, then the reasons for the failure are listed in the failureReasons field.
        public let botRecommendationStatus: BotRecommendationStatus
        /// A timestamp of the date and time that the bot recommendation was created.
        public let creationDateTime: Date?
        /// A timestamp of the date and time that the bot recommendation was last updated.
        public let lastUpdatedDateTime: Date?

        public init(botRecommendationId: String, botRecommendationStatus: BotRecommendationStatus, creationDateTime: Date? = nil, lastUpdatedDateTime: Date? = nil) {
            self.botRecommendationId = botRecommendationId
            self.botRecommendationStatus = botRecommendationStatus
            self.creationDateTime = creationDateTime
            self.lastUpdatedDateTime = lastUpdatedDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case botRecommendationId
            case botRecommendationStatus
            case creationDateTime
            case lastUpdatedDateTime
        }
    }

    public struct BotSortBy: AWSEncodableShape {
        /// The attribute to use to sort the list of bots.
        public let attribute: BotSortAttribute
        /// The order to sort the list. You can choose ascending or descending.
        public let order: SortOrder

        public init(attribute: BotSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct BotSummary: AWSDecodableShape {
        /// The unique identifier assigned to the bot. Use this ID to get detailed information about the bot with the DescribeBot operation.
        public let botId: String?
        /// The name of the bot.
        public let botName: String?
        /// The current status of the bot. When the status is Available the bot is ready for use.
        public let botStatus: BotStatus?
        /// The description of the bot.
        public let description: String?
        /// The date and time that the bot was last updated.
        public let lastUpdatedDateTime: Date?
        /// The latest numerical version in use for the bot.
        public let latestBotVersion: String?

        public init(botId: String? = nil, botName: String? = nil, botStatus: BotStatus? = nil, description: String? = nil, lastUpdatedDateTime: Date? = nil, latestBotVersion: String? = nil) {
            self.botId = botId
            self.botName = botName
            self.botStatus = botStatus
            self.description = description
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.latestBotVersion = latestBotVersion
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botName
            case botStatus
            case description
            case lastUpdatedDateTime
            case latestBotVersion
        }
    }

    public struct BotVersionLocaleDetails: AWSEncodableShape & AWSDecodableShape {
        /// The version of a bot used for a bot locale.
        public let sourceBotVersion: String

        public init(sourceBotVersion: String) {
            self.sourceBotVersion = sourceBotVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.sourceBotVersion, name: "sourceBotVersion", parent: name, max: 5)
            try self.validate(self.sourceBotVersion, name: "sourceBotVersion", parent: name, min: 1)
            try self.validate(self.sourceBotVersion, name: "sourceBotVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
        }

        private enum CodingKeys: String, CodingKey {
            case sourceBotVersion
        }
    }

    public struct BotVersionSortBy: AWSEncodableShape {
        /// The attribute to use to sort the list of versions.
        public let attribute: BotVersionSortAttribute
        /// The order to sort the list. You can specify ascending or descending order.
        public let order: SortOrder

        public init(attribute: BotVersionSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct BotVersionSummary: AWSDecodableShape {
        /// The name of the bot associated with the version.
        public let botName: String?
        /// The status of the bot. When the status is available, the version of the bot is ready for use.
        public let botStatus: BotStatus?
        /// The numeric version of the bot, or DRAFT to indicate that this is the version of the bot that can be updated..
        public let botVersion: String?
        /// A timestamp of the date and time that the version was created.
        public let creationDateTime: Date?
        /// The description of the version.
        public let description: String?

        public init(botName: String? = nil, botStatus: BotStatus? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil) {
            self.botName = botName
            self.botStatus = botStatus
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
        }

        private enum CodingKeys: String, CodingKey {
            case botName
            case botStatus
            case botVersion
            case creationDateTime
            case description
        }
    }

    public struct BuildBotLocaleRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the bot to build. The identifier is returned in the response from the CreateBot operation.
        public let botId: String
        /// The version of the bot to build. This can only be the draft version of the bot.
        public let botVersion: String
        /// The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages.
        public let localeId: String

        public init(botId: String, botVersion: String, localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct BuildBotLocaleResponse: AWSDecodableShape {
        /// The identifier of the specified bot.
        public let botId: String?
        /// The bot's build status. When the status is ReadyExpressTesting you can test the bot using the utterances defined for the intents and slot types. When the status is Built, the bot is ready for use and can be tested using any utterance.
        public let botLocaleStatus: BotLocaleStatus?
        /// The version of the bot that was built. This is only the draft version of the bot.
        public let botVersion: String?
        /// A timestamp indicating the date and time that the bot was last built for this locale.
        public let lastBuildSubmittedDateTime: Date?
        /// The language and locale specified of where the bot can be used.
        public let localeId: String?

        public init(botId: String? = nil, botLocaleStatus: BotLocaleStatus? = nil, botVersion: String? = nil, lastBuildSubmittedDateTime: Date? = nil, localeId: String? = nil) {
            self.botId = botId
            self.botLocaleStatus = botLocaleStatus
            self.botVersion = botVersion
            self.lastBuildSubmittedDateTime = lastBuildSubmittedDateTime
            self.localeId = localeId
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botLocaleStatus
            case botVersion
            case lastBuildSubmittedDateTime
            case localeId
        }
    }

    public struct BuiltInIntentSortBy: AWSEncodableShape {
        /// The attribute to use to sort the list of built-in intents.
        public let attribute: BuiltInIntentSortAttribute
        /// The order to sort the list. You can specify ascending or descending order.
        public let order: SortOrder

        public init(attribute: BuiltInIntentSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct BuiltInIntentSummary: AWSDecodableShape {
        /// The description of the intent.
        public let description: String?
        /// The signature of the built-in intent. Use this to specify the parent intent of a derived intent.
        public let intentSignature: String?

        public init(description: String? = nil, intentSignature: String? = nil) {
            self.description = description
            self.intentSignature = intentSignature
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case intentSignature
        }
    }

    public struct BuiltInSlotTypeSortBy: AWSEncodableShape {
        /// The attribute to use to sort the list of built-in intents.
        public let attribute: BuiltInSlotTypeSortAttribute
        /// The order to sort the list. You can choose ascending or descending.
        public let order: SortOrder

        public init(attribute: BuiltInSlotTypeSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct BuiltInSlotTypeSummary: AWSDecodableShape {
        /// The description of the built-in slot type.
        public let description: String?
        /// The signature of the built-in slot type. Use this to specify the parent slot type of a derived slot type.
        public let slotTypeSignature: String?

        public init(description: String? = nil, slotTypeSignature: String? = nil) {
            self.description = description
            self.slotTypeSignature = slotTypeSignature
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case slotTypeSignature
        }
    }

    public struct Button: AWSEncodableShape & AWSDecodableShape {
        /// The text that appears on the button. Use this to tell the user what value is returned when they choose this button.
        public let text: String
        /// The value returned to Amazon Lex when the user chooses this button. This must be one of the slot values configured for the slot.
        public let value: String

        public init(text: String, value: String) {
            self.text = text
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, max: 50)
            try self.validate(self.text, name: "text", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 50)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case text
            case value
        }
    }

    public struct CloudWatchLogGroupLogDestination: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the log group where text and metadata logs are delivered.
        public let cloudWatchLogGroupArn: String
        /// The prefix of the log stream name within the log group that you specified
        public let logPrefix: String

        public init(cloudWatchLogGroupArn: String, logPrefix: String) {
            self.cloudWatchLogGroupArn = cloudWatchLogGroupArn
            self.logPrefix = logPrefix
        }

        public func validate(name: String) throws {
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, max: 2048)
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, min: 1)
            try self.validate(self.cloudWatchLogGroupArn, name: "cloudWatchLogGroupArn", parent: name, pattern: "^arn:[\\w\\-]+:logs:[\\w\\-]+:[\\d]{12}:log-group:[\\.\\-_/#A-Za-z0-9]{1,512}(?::\\*)?$")
            try self.validate(self.logPrefix, name: "logPrefix", parent: name, max: 1024)
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogGroupArn
            case logPrefix
        }
    }

    public struct CodeHookSpecification: AWSEncodableShape & AWSDecodableShape {
        public let lambdaCodeHook: LambdaCodeHook

        public init(lambdaCodeHook: LambdaCodeHook) {
            self.lambdaCodeHook = lambdaCodeHook
        }

        public func validate(name: String) throws {
            try self.lambdaCodeHook.validate(name: "\(name).lambdaCodeHook")
        }

        private enum CodingKeys: String, CodingKey {
            case lambdaCodeHook
        }
    }

    public struct CompositeSlotTypeSetting: AWSEncodableShape & AWSDecodableShape {
        /// Subslots in the composite slot.
        public let subSlots: [SubSlotTypeComposition]?

        public init(subSlots: [SubSlotTypeComposition]? = nil) {
            self.subSlots = subSlots
        }

        public func validate(name: String) throws {
            try self.subSlots?.forEach {
                try $0.validate(name: "\(name).subSlots[]")
            }
            try self.validate(self.subSlots, name: "subSlots", parent: name, max: 6)
        }

        private enum CodingKeys: String, CodingKey {
            case subSlots
        }
    }

    public struct Condition: AWSEncodableShape & AWSDecodableShape {
        /// The expression string that is evaluated.
        public let expressionString: String

        public init(expressionString: String) {
            self.expressionString = expressionString
        }

        public func validate(name: String) throws {
            try self.validate(self.expressionString, name: "expressionString", parent: name, max: 1024)
            try self.validate(self.expressionString, name: "expressionString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case expressionString
        }
    }

    public struct ConditionalBranch: AWSEncodableShape & AWSDecodableShape {
        /// Contains the expression to evaluate. If the condition is true, the branch's actions are taken.
        public let condition: Condition
        /// The name of the branch.
        public let name: String
        /// The next step in the conversation.
        public let nextStep: DialogState
        public let response: ResponseSpecification?

        public init(condition: Condition, name: String, nextStep: DialogState, response: ResponseSpecification? = nil) {
            self.condition = condition
            self.name = name
            self.nextStep = nextStep
            self.response = response
        }

        public func validate(name: String) throws {
            try self.condition.validate(name: "\(name).condition")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.nextStep.validate(name: "\(name).nextStep")
            try self.response?.validate(name: "\(name).response")
        }

        private enum CodingKeys: String, CodingKey {
            case condition
            case name
            case nextStep
            case response
        }
    }

    public struct ConditionalSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether a conditional branch is active. When active is false, the conditions are not evaluated.
        public let active: Bool
        /// A list of conditional branches. A conditional branch is made up of a condition, a response and a next step. The response and next step are executed when the condition is true.
        public let conditionalBranches: [ConditionalBranch]
        /// The conditional branch that should be followed when the conditions for other branches are not satisfied. A conditional branch is made up of a condition, a response and a next step.
        public let defaultBranch: DefaultConditionalBranch

        public init(active: Bool, conditionalBranches: [ConditionalBranch], defaultBranch: DefaultConditionalBranch) {
            self.active = active
            self.conditionalBranches = conditionalBranches
            self.defaultBranch = defaultBranch
        }

        public func validate(name: String) throws {
            try self.conditionalBranches.forEach {
                try $0.validate(name: "\(name).conditionalBranches[]")
            }
            try self.validate(self.conditionalBranches, name: "conditionalBranches", parent: name, max: 4)
            try self.validate(self.conditionalBranches, name: "conditionalBranches", parent: name, min: 1)
            try self.defaultBranch.validate(name: "\(name).defaultBranch")
        }

        private enum CodingKeys: String, CodingKey {
            case active
            case conditionalBranches
            case defaultBranch
        }
    }

    public struct ConversationLogSettings: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon S3 settings for logging audio to an S3 bucket.
        public let audioLogSettings: [AudioLogSetting]?
        /// The Amazon CloudWatch Logs settings for logging text and metadata.
        public let textLogSettings: [TextLogSetting]?

        public init(audioLogSettings: [AudioLogSetting]? = nil, textLogSettings: [TextLogSetting]? = nil) {
            self.audioLogSettings = audioLogSettings
            self.textLogSettings = textLogSettings
        }

        public func validate(name: String) throws {
            try self.audioLogSettings?.forEach {
                try $0.validate(name: "\(name).audioLogSettings[]")
            }
            try self.validate(self.audioLogSettings, name: "audioLogSettings", parent: name, max: 1)
            try self.validate(self.audioLogSettings, name: "audioLogSettings", parent: name, min: 1)
            try self.textLogSettings?.forEach {
                try $0.validate(name: "\(name).textLogSettings[]")
            }
            try self.validate(self.textLogSettings, name: "textLogSettings", parent: name, max: 1)
            try self.validate(self.textLogSettings, name: "textLogSettings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case audioLogSettings
            case textLogSettings
        }
    }

    public struct CreateBotAliasRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId"))
        ]

        /// Maps configuration information to a specific locale. You can use this parameter to specify a specific Lambda function to run different functions in different locales.
        public let botAliasLocaleSettings: [String: BotAliasLocaleSettings]?
        /// The alias to create. The name must be unique for the bot.
        public let botAliasName: String
        /// The unique identifier of the bot that the alias applies to.
        public let botId: String
        /// The version of the bot that this alias points to. You can use the UpdateBotAlias operation to change the bot version associated with the alias.
        public let botVersion: String?
        /// Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable conversation logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch Logs. Audio logs store audio input in Amazon S3.
        public let conversationLogSettings: ConversationLogSettings?
        /// A description of the alias. Use this description to help identify the alias.
        public let description: String?
        public let sentimentAnalysisSettings: SentimentAnalysisSettings?
        /// A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the UpdateBotAlias operation to update the tags on a bot alias. To update tags, use the TagResource operation.
        public let tags: [String: String]?

        public init(botAliasLocaleSettings: [String: BotAliasLocaleSettings]? = nil, botAliasName: String, botId: String, botVersion: String? = nil, conversationLogSettings: ConversationLogSettings? = nil, description: String? = nil, sentimentAnalysisSettings: SentimentAnalysisSettings? = nil, tags: [String: String]? = nil) {
            self.botAliasLocaleSettings = botAliasLocaleSettings
            self.botAliasName = botAliasName
            self.botId = botId
            self.botVersion = botVersion
            self.conversationLogSettings = conversationLogSettings
            self.description = description
            self.sentimentAnalysisSettings = sentimentAnalysisSettings
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.botAliasLocaleSettings?.forEach {
                try $0.value.validate(name: "\(name).botAliasLocaleSettings[\"\($0.key)\"]")
            }
            try self.validate(self.botAliasLocaleSettings, name: "botAliasLocaleSettings", parent: name, min: 1)
            try self.validate(self.botAliasName, name: "botAliasName", parent: name, max: 100)
            try self.validate(self.botAliasName, name: "botAliasName", parent: name, min: 1)
            try self.validate(self.botAliasName, name: "botAliasName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^[0-9]+$")
            try self.conversationLogSettings?.validate(name: "\(name).conversationLogSettings")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case botAliasLocaleSettings
            case botAliasName
            case botVersion
            case conversationLogSettings
            case description
            case sentimentAnalysisSettings
            case tags
        }
    }

    public struct CreateBotAliasResponse: AWSDecodableShape {
        /// The unique identifier of the bot alias.
        public let botAliasId: String?
        /// Configuration information for a specific locale.
        public let botAliasLocaleSettings: [String: BotAliasLocaleSettings]?
        /// The name specified for the bot alias.
        public let botAliasName: String?
        /// The current status of the alias. The alias is first put into the Creating state. When the alias is ready to be used, it is put into the Available state. You can use the DescribeBotAlias operation to get the current state of an alias.
        public let botAliasStatus: BotAliasStatus?
        /// The unique identifier of the bot that this alias applies to.
        public let botId: String?
        /// The version of the bot associated with this alias.
        public let botVersion: String?
        /// The conversation log settings specified for the alias.
        public let conversationLogSettings: ConversationLogSettings?
        /// A Unix timestamp indicating the date and time that the bot alias was created.
        public let creationDateTime: Date?
        /// The description specified for the bot alias.
        public let description: String?
        public let sentimentAnalysisSettings: SentimentAnalysisSettings?
        /// A list of tags associated with the bot alias.
        public let tags: [String: String]?

        public init(botAliasId: String? = nil, botAliasLocaleSettings: [String: BotAliasLocaleSettings]? = nil, botAliasName: String? = nil, botAliasStatus: BotAliasStatus? = nil, botId: String? = nil, botVersion: String? = nil, conversationLogSettings: ConversationLogSettings? = nil, creationDateTime: Date? = nil, description: String? = nil, sentimentAnalysisSettings: SentimentAnalysisSettings? = nil, tags: [String: String]? = nil) {
            self.botAliasId = botAliasId
            self.botAliasLocaleSettings = botAliasLocaleSettings
            self.botAliasName = botAliasName
            self.botAliasStatus = botAliasStatus
            self.botId = botId
            self.botVersion = botVersion
            self.conversationLogSettings = conversationLogSettings
            self.creationDateTime = creationDateTime
            self.description = description
            self.sentimentAnalysisSettings = sentimentAnalysisSettings
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case botAliasId
            case botAliasLocaleSettings
            case botAliasName
            case botAliasStatus
            case botId
            case botVersion
            case conversationLogSettings
            case creationDateTime
            case description
            case sentimentAnalysisSettings
            case tags
        }
    }

    public struct CreateBotLocaleRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion"))
        ]

        /// The identifier of the bot to create the locale for.
        public let botId: String
        /// The version of the bot to create the locale for. This can only be the draft version of the bot.
        public let botVersion: String
        /// A description of the bot locale. Use this to help identify the bot locale in lists.
        public let description: String?
        /// The identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages.
        public let localeId: String
        /// Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot. For example, suppose a bot is configured with the confidence threshold of 0.80 and the AMAZON.FallbackIntent. Amazon Lex returns three alternative intents with the following confidence scores: IntentA (0.70), IntentB (0.60), IntentC (0.50). The response from the RecognizeText operation would be:   AMAZON.FallbackIntent   IntentA   IntentB   IntentC
        public let nluIntentConfidenceThreshold: Double
        /// The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user.
        public let voiceSettings: VoiceSettings?

        public init(botId: String, botVersion: String, description: String? = nil, localeId: String, nluIntentConfidenceThreshold: Double, voiceSettings: VoiceSettings? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.description = description
            self.localeId = localeId
            self.nluIntentConfidenceThreshold = nluIntentConfidenceThreshold
            self.voiceSettings = voiceSettings
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.nluIntentConfidenceThreshold, name: "nluIntentConfidenceThreshold", parent: name, max: 1.0)
            try self.validate(self.nluIntentConfidenceThreshold, name: "nluIntentConfidenceThreshold", parent: name, min: 0.0)
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case localeId
            case nluIntentConfidenceThreshold
            case voiceSettings
        }
    }

    public struct CreateBotLocaleResponse: AWSDecodableShape {
        /// The specified bot identifier.
        public let botId: String?
        /// The status of the bot. When the status is Creating the bot locale is being configured. When the status is Building Amazon Lex is building the bot for testing and use. If the status of the bot is ReadyExpressTesting, you can test the bot using the exact utterances specified in the bots' intents. When the bot is ready for full testing or to run, the status is Built. If there was a problem with building the bot, the status is Failed. If the bot was saved but not built, the status is NotBuilt.
        public let botLocaleStatus: BotLocaleStatus?
        /// The specified bot version.
        public let botVersion: String?
        /// A timestamp specifying the date and time that the bot locale was created.
        public let creationDateTime: Date?
        /// The specified description of the bot locale.
        public let description: String?
        /// The specified locale identifier.
        public let localeId: String?
        /// The specified locale name.
        public let localeName: String?
        /// The specified confidence threshold for inserting the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents.
        public let nluIntentConfidenceThreshold: Double?
        /// The Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user.
        public let voiceSettings: VoiceSettings?

        public init(botId: String? = nil, botLocaleStatus: BotLocaleStatus? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil, localeId: String? = nil, localeName: String? = nil, nluIntentConfidenceThreshold: Double? = nil, voiceSettings: VoiceSettings? = nil) {
            self.botId = botId
            self.botLocaleStatus = botLocaleStatus
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
            self.localeId = localeId
            self.localeName = localeName
            self.nluIntentConfidenceThreshold = nluIntentConfidenceThreshold
            self.voiceSettings = voiceSettings
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botLocaleStatus
            case botVersion
            case creationDateTime
            case description
            case localeId
            case localeName
            case nluIntentConfidenceThreshold
            case voiceSettings
        }
    }

    public struct CreateBotRequest: AWSEncodableShape {
        /// The name of the bot. The bot name must be unique in the account that creates the bot.
        public let botName: String
        /// A list of tags to add to the bot. You can only add tags when you create a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.
        public let botTags: [String: String]?
        /// Provides information on additional privacy protections Amazon Lex should use with the bot's data.
        public let dataPrivacy: DataPrivacy
        /// A description of the bot. It appears in lists to help you identify a particular bot.
        public let description: String?
        /// The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.  A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout. You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.
        public let idleSessionTTLInSeconds: Int
        /// The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.
        public let roleArn: String
        /// A list of tags to add to the test alias for a bot. You can only add tags when you create a bot. You can't use the UpdateAlias operation to update tags. To update tags on the test alias, use the TagResource operation.
        public let testBotAliasTags: [String: String]?

        public init(botName: String, botTags: [String: String]? = nil, dataPrivacy: DataPrivacy, description: String? = nil, idleSessionTTLInSeconds: Int, roleArn: String, testBotAliasTags: [String: String]? = nil) {
            self.botName = botName
            self.botTags = botTags
            self.dataPrivacy = dataPrivacy
            self.description = description
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.roleArn = roleArn
            self.testBotAliasTags = testBotAliasTags
        }

        public func validate(name: String) throws {
            try self.validate(self.botName, name: "botName", parent: name, max: 100)
            try self.validate(self.botName, name: "botName", parent: name, min: 1)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.botTags?.forEach {
                try validate($0.key, name: "botTags.key", parent: name, max: 128)
                try validate($0.key, name: "botTags.key", parent: name, min: 1)
                try validate($0.value, name: "botTags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.botTags, name: "botTags", parent: name, max: 200)
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.idleSessionTTLInSeconds, name: "idleSessionTTLInSeconds", parent: name, max: 86400)
            try self.validate(self.idleSessionTTLInSeconds, name: "idleSessionTTLInSeconds", parent: name, min: 60)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 32)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws:iam::[0-9]{12}:role/.*$")
            try self.testBotAliasTags?.forEach {
                try validate($0.key, name: "testBotAliasTags.key", parent: name, max: 128)
                try validate($0.key, name: "testBotAliasTags.key", parent: name, min: 1)
                try validate($0.value, name: "testBotAliasTags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.testBotAliasTags, name: "testBotAliasTags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case botName
            case botTags
            case dataPrivacy
            case description
            case idleSessionTTLInSeconds
            case roleArn
            case testBotAliasTags
        }
    }

    public struct CreateBotResponse: AWSDecodableShape {
        /// A unique identifier for a particular bot. You use this to identify the bot when you call other Amazon Lex API operations.
        public let botId: String?
        /// The name specified for the bot.
        public let botName: String?
        /// Shows the current status of the bot. The bot is first in the Creating status. Once the bot is read for use, it changes to the Available status. After the bot is created, you can use the Draft version of the bot.
        public let botStatus: BotStatus?
        /// A list of tags associated with the bot.
        public let botTags: [String: String]?
        /// A timestamp indicating the date and time that the bot was created.
        public let creationDateTime: Date?
        /// The data privacy settings specified for the bot.
        public let dataPrivacy: DataPrivacy?
        /// The description specified for the bot.
        public let description: String?
        /// The session idle time specified for the bot.
        public let idleSessionTTLInSeconds: Int?
        /// The IAM role specified for the bot.
        public let roleArn: String?
        /// A list of tags associated with the test alias for the bot.
        public let testBotAliasTags: [String: String]?

        public init(botId: String? = nil, botName: String? = nil, botStatus: BotStatus? = nil, botTags: [String: String]? = nil, creationDateTime: Date? = nil, dataPrivacy: DataPrivacy? = nil, description: String? = nil, idleSessionTTLInSeconds: Int? = nil, roleArn: String? = nil, testBotAliasTags: [String: String]? = nil) {
            self.botId = botId
            self.botName = botName
            self.botStatus = botStatus
            self.botTags = botTags
            self.creationDateTime = creationDateTime
            self.dataPrivacy = dataPrivacy
            self.description = description
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.roleArn = roleArn
            self.testBotAliasTags = testBotAliasTags
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botName
            case botStatus
            case botTags
            case creationDateTime
            case dataPrivacy
            case description
            case idleSessionTTLInSeconds
            case roleArn
            case testBotAliasTags
        }
    }

    public struct CreateBotVersionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId"))
        ]

        /// The identifier of the bot to create the version for.
        public let botId: String
        /// Specifies the locales that Amazon Lex adds to this version. You can choose the Draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.
        public let botVersionLocaleSpecification: [String: BotVersionLocaleDetails]
        /// A description of the version. Use the description to help identify the version in lists.
        public let description: String?

        public init(botId: String, botVersionLocaleSpecification: [String: BotVersionLocaleDetails], description: String? = nil) {
            self.botId = botId
            self.botVersionLocaleSpecification = botVersionLocaleSpecification
            self.description = description
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.botVersionLocaleSpecification.forEach {
                try $0.value.validate(name: "\(name).botVersionLocaleSpecification[\"\($0.key)\"]")
            }
            try self.validate(self.botVersionLocaleSpecification, name: "botVersionLocaleSpecification", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case botVersionLocaleSpecification
            case description
        }
    }

    public struct CreateBotVersionResponse: AWSDecodableShape {
        /// The bot identifier specified in the request.
        public let botId: String?
        /// When you send a request to create or update a bot, Amazon Lex sets the status response element to Creating. After Amazon Lex builds the bot, it sets status to Available. If Amazon Lex can't build the bot, it sets status to Failed.
        public let botStatus: BotStatus?
        /// The version number assigned to the version.
        public let botVersion: String?
        /// The source versions used for each locale in the new version.
        public let botVersionLocaleSpecification: [String: BotVersionLocaleDetails]?
        /// A timestamp of the date and time that the version was created.
        public let creationDateTime: Date?
        /// The description of the version specified in the request.
        public let description: String?

        public init(botId: String? = nil, botStatus: BotStatus? = nil, botVersion: String? = nil, botVersionLocaleSpecification: [String: BotVersionLocaleDetails]? = nil, creationDateTime: Date? = nil, description: String? = nil) {
            self.botId = botId
            self.botStatus = botStatus
            self.botVersion = botVersion
            self.botVersionLocaleSpecification = botVersionLocaleSpecification
            self.creationDateTime = creationDateTime
            self.description = description
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botStatus
            case botVersion
            case botVersionLocaleSpecification
            case creationDateTime
            case description
        }
    }

    public struct CreateExportRequest: AWSEncodableShape {
        /// The file format of the bot or bot locale definition files.
        public let fileFormat: ImportExportFileFormat
        /// An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.
        public let filePassword: String?
        /// Specifies the type of resource to export, either a bot or a bot locale. You can only specify one type of resource to export.
        public let resourceSpecification: ExportResourceSpecification

        public init(fileFormat: ImportExportFileFormat, filePassword: String? = nil, resourceSpecification: ExportResourceSpecification) {
            self.fileFormat = fileFormat
            self.filePassword = filePassword
            self.resourceSpecification = resourceSpecification
        }

        public func validate(name: String) throws {
            try self.validate(self.filePassword, name: "filePassword", parent: name, max: 1024)
            try self.validate(self.filePassword, name: "filePassword", parent: name, min: 1)
            try self.resourceSpecification.validate(name: "\(name).resourceSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case fileFormat
            case filePassword
            case resourceSpecification
        }
    }

    public struct CreateExportResponse: AWSDecodableShape {
        /// The date and time that the request to export a bot was created.
        public let creationDateTime: Date?
        /// An identifier for a specific request to create an export.
        public let exportId: String?
        /// The status of the export. When the status is Completed, you can use the DescribeExport operation to get the pre-signed S3 URL link to your exported bot or bot locale.
        public let exportStatus: ExportStatus?
        /// The file format used for the bot or bot locale definition files.
        public let fileFormat: ImportExportFileFormat?
        /// A description of the type of resource that was exported, either a bot or a bot locale.
        public let resourceSpecification: ExportResourceSpecification?

        public init(creationDateTime: Date? = nil, exportId: String? = nil, exportStatus: ExportStatus? = nil, fileFormat: ImportExportFileFormat? = nil, resourceSpecification: ExportResourceSpecification? = nil) {
            self.creationDateTime = creationDateTime
            self.exportId = exportId
            self.exportStatus = exportStatus
            self.fileFormat = fileFormat
            self.resourceSpecification = resourceSpecification
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime
            case exportId
            case exportStatus
            case fileFormat
            case resourceSpecification
        }
    }

    public struct CreateIntentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the bot associated with this intent.
        public let botId: String
        /// The identifier of the version of the bot associated with this intent.
        public let botVersion: String
        /// A description of the intent. Use the description to help identify the intent in lists.
        public let description: String?
        /// Specifies that Amazon Lex invokes the alias Lambda function for each user input. You can invoke this Lambda function to personalize user interaction. For example, suppose that your bot determines that the user's name is John. You Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, glutenIntolerant to true. You might find John's phone number and set the corresponding session attribute.
        public let dialogCodeHook: DialogCodeHookSettings?
        /// Specifies that Amazon Lex invokes the alias Lambda function when the intent is ready for fulfillment. You can invoke this function to complete the bot's transaction with the user. For example, in a pizza ordering bot, the Lambda function can look up the closest pizza restaurant to the customer's location and then place an order on the customer's behalf.
        public let fulfillmentCodeHook: FulfillmentCodeHookSettings?
        /// Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.
        public let initialResponseSetting: InitialResponseSetting?
        /// A list of contexts that must be active for this intent to be considered by Amazon Lex. When an intent has an input context list, Amazon Lex only considers using the intent in an interaction with the user when the specified contexts are included in the active context list for the session. If the contexts are not active, then Amazon Lex will not use the intent. A context can be automatically activated using the outputContexts property or it can be set at runtime. For example, if there are two intents with different input contexts that respond to the same utterances, only the intent with the active context will respond. An intent may have up to 5 input contexts. If an intent has multiple input contexts, all of the contexts must be active to consider the intent.
        public let inputContexts: [InputContext]?
        /// Sets the response that Amazon Lex sends to the user when the intent is closed.
        public let intentClosingSetting: IntentClosingSetting?
        /// Provides prompts that Amazon Lex sends to the user to confirm the completion of an intent. If the user answers "no," the settings contain a statement that is sent to the user to end the intent.
        public let intentConfirmationSetting: IntentConfirmationSetting?
        /// The name of the intent. Intent names must be unique in the locale that contains the intent and cannot match the name of any built-in intent.
        public let intentName: String
        /// Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. The AMAZON.KendraSearchIntent intent is called when Amazon Lex can't determine another intent to invoke.
        public let kendraConfiguration: KendraConfiguration?
        /// The identifier of the language and locale where this intent is used. All of the bots, slot types, and slots used by the intent must have the same locale. For more information, see Supported languages.
        public let localeId: String
        /// A lists of contexts that the intent activates when it is fulfilled. You can use an output context to indicate the intents that Amazon Lex should consider for the next turn of the conversation with a customer.  When you use the outputContextsList property, all of the contexts specified in the list are activated when the intent is fulfilled. You can set up to 10 output contexts. You can also set the number of conversation turns that the context should be active, or the length of time that the context should be active.
        public let outputContexts: [OutputContext]?
        /// A unique identifier for the built-in intent to base this intent on.
        public let parentIntentSignature: String?
        /// An array of strings that a user might say to signal the intent. For example, "I want a pizza", or "I want a {PizzaSize} pizza".  In an utterance, slot names are enclosed in curly braces ("{", "}") to indicate where they should be displayed in the utterance shown to the user..
        public let sampleUtterances: [SampleUtterance]?

        public init(botId: String, botVersion: String, description: String? = nil, dialogCodeHook: DialogCodeHookSettings? = nil, fulfillmentCodeHook: FulfillmentCodeHookSettings? = nil, initialResponseSetting: InitialResponseSetting? = nil, inputContexts: [InputContext]? = nil, intentClosingSetting: IntentClosingSetting? = nil, intentConfirmationSetting: IntentConfirmationSetting? = nil, intentName: String, kendraConfiguration: KendraConfiguration? = nil, localeId: String, outputContexts: [OutputContext]? = nil, parentIntentSignature: String? = nil, sampleUtterances: [SampleUtterance]? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.description = description
            self.dialogCodeHook = dialogCodeHook
            self.fulfillmentCodeHook = fulfillmentCodeHook
            self.initialResponseSetting = initialResponseSetting
            self.inputContexts = inputContexts
            self.intentClosingSetting = intentClosingSetting
            self.intentConfirmationSetting = intentConfirmationSetting
            self.intentName = intentName
            self.kendraConfiguration = kendraConfiguration
            self.localeId = localeId
            self.outputContexts = outputContexts
            self.parentIntentSignature = parentIntentSignature
            self.sampleUtterances = sampleUtterances
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.fulfillmentCodeHook?.validate(name: "\(name).fulfillmentCodeHook")
            try self.initialResponseSetting?.validate(name: "\(name).initialResponseSetting")
            try self.inputContexts?.forEach {
                try $0.validate(name: "\(name).inputContexts[]")
            }
            try self.validate(self.inputContexts, name: "inputContexts", parent: name, max: 5)
            try self.intentClosingSetting?.validate(name: "\(name).intentClosingSetting")
            try self.intentConfirmationSetting?.validate(name: "\(name).intentConfirmationSetting")
            try self.validate(self.intentName, name: "intentName", parent: name, max: 100)
            try self.validate(self.intentName, name: "intentName", parent: name, min: 1)
            try self.validate(self.intentName, name: "intentName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.kendraConfiguration?.validate(name: "\(name).kendraConfiguration")
            try self.outputContexts?.forEach {
                try $0.validate(name: "\(name).outputContexts[]")
            }
            try self.validate(self.outputContexts, name: "outputContexts", parent: name, max: 10)
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case dialogCodeHook
            case fulfillmentCodeHook
            case initialResponseSetting
            case inputContexts
            case intentClosingSetting
            case intentConfirmationSetting
            case intentName
            case kendraConfiguration
            case outputContexts
            case parentIntentSignature
            case sampleUtterances
        }
    }

    public struct CreateIntentResponse: AWSDecodableShape {
        /// The identifier of the bot associated with the intent.
        public let botId: String?
        /// The identifier of the version of the bot associated with the intent.
        public let botVersion: String?
        /// A timestamp of the date and time that the intent was created.
        public let creationDateTime: Date?
        /// The description specified for the intent.
        public let description: String?
        /// The dialog Lambda function specified for the intent.
        public let dialogCodeHook: DialogCodeHookSettings?
        /// The fulfillment Lambda function specified for the intent.
        public let fulfillmentCodeHook: FulfillmentCodeHookSettings?
        /// Configuration settings for the response that is sent to the user at the beginning of a conversation, before eliciting slot values.
        public let initialResponseSetting: InitialResponseSetting?
        /// The list of input contexts specified for the intent.
        public let inputContexts: [InputContext]?
        /// The closing setting specified for the intent.
        public let intentClosingSetting: IntentClosingSetting?
        /// The confirmation setting specified for the intent.
        public let intentConfirmationSetting: IntentConfirmationSetting?
        /// A unique identifier for the intent.
        public let intentId: String?
        /// The name specified for the intent.
        public let intentName: String?
        /// Configuration for searching a Amazon Kendra index specified for the intent.
        public let kendraConfiguration: KendraConfiguration?
        /// The locale that the intent is specified to use.
        public let localeId: String?
        /// The list of output contexts specified for the intent.
        public let outputContexts: [OutputContext]?
        /// The signature of the parent intent specified for the intent.
        public let parentIntentSignature: String?
        /// The sample utterances specified for the intent.
        public let sampleUtterances: [SampleUtterance]?

        public init(botId: String? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil, dialogCodeHook: DialogCodeHookSettings? = nil, fulfillmentCodeHook: FulfillmentCodeHookSettings? = nil, initialResponseSetting: InitialResponseSetting? = nil, inputContexts: [InputContext]? = nil, intentClosingSetting: IntentClosingSetting? = nil, intentConfirmationSetting: IntentConfirmationSetting? = nil, intentId: String? = nil, intentName: String? = nil, kendraConfiguration: KendraConfiguration? = nil, localeId: String? = nil, outputContexts: [OutputContext]? = nil, parentIntentSignature: String? = nil, sampleUtterances: [SampleUtterance]? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
            self.dialogCodeHook = dialogCodeHook
            self.fulfillmentCodeHook = fulfillmentCodeHook
            self.initialResponseSetting = initialResponseSetting
            self.inputContexts = inputContexts
            self.intentClosingSetting = intentClosingSetting
            self.intentConfirmationSetting = intentConfirmationSetting
            self.intentId = intentId
            self.intentName = intentName
            self.kendraConfiguration = kendraConfiguration
            self.localeId = localeId
            self.outputContexts = outputContexts
            self.parentIntentSignature = parentIntentSignature
            self.sampleUtterances = sampleUtterances
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case creationDateTime
            case description
            case dialogCodeHook
            case fulfillmentCodeHook
            case initialResponseSetting
            case inputContexts
            case intentClosingSetting
            case intentConfirmationSetting
            case intentId
            case intentName
            case kendraConfiguration
            case localeId
            case outputContexts
            case parentIntentSignature
            case sampleUtterances
        }
    }

    public struct CreateResourcePolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see  IAM JSON policy reference .  If the policy isn't valid, Amazon Lex returns a validation exception.
        public let policy: String
        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
        public let resourceArn: String

        public init(policy: String, resourceArn: String) {
            self.policy = policy
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.policy, name: "policy", parent: name, min: 2)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case policy
        }
    }

    public struct CreateResourcePolicyResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy was attached to.
        public let resourceArn: String?
        /// The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
        public let revisionId: String?

        public init(resourceArn: String? = nil, revisionId: String? = nil) {
            self.resourceArn = resourceArn
            self.revisionId = revisionId
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case revisionId
        }
    }

    public struct CreateResourcePolicyStatementRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "expectedRevisionId", location: .querystring("expectedRevisionId")),
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The Amazon Lex action that this policy either allows or denies. The action must apply to the resource type of the specified ARN. For more information, see  Actions, resources, and condition keys for Amazon Lex V2.
        public let action: [String]
        /// Specifies a condition when the policy is in effect. If the principal of the policy is a service principal, you must provide two condition blocks, one with a SourceAccount global condition key and one with a SourceArn global condition key. For more information, see IAM JSON policy elements: Condition .
        public let condition: [String: [String: String]]?
        /// Determines whether the statement allows or denies access to the resource.
        public let effect: Effect
        /// The identifier of the revision of the policy to edit. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception. If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.
        public let expectedRevisionId: String?
        /// An IAM principal, such as an IAM users, IAM roles, or AWS services that is allowed or denied access to a resource. For more information, see AWS JSON policy elements: Principal.
        public let principal: [Principal]
        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
        public let resourceArn: String
        /// The name of the statement. The ID is the same as the Sid IAM property. The statement name must be unique within the policy. For more information, see IAM JSON policy elements: Sid.
        public let statementId: String

        public init(action: [String], condition: [String: [String: String]]? = nil, effect: Effect, expectedRevisionId: String? = nil, principal: [Principal], resourceArn: String, statementId: String) {
            self.action = action
            self.condition = condition
            self.effect = effect
            self.expectedRevisionId = expectedRevisionId
            self.principal = principal
            self.resourceArn = resourceArn
            self.statementId = statementId
        }

        public func validate(name: String) throws {
            try self.action.forEach {
                try validate($0, name: "action[]", parent: name, max: 50)
                try validate($0, name: "action[]", parent: name, min: 5)
                try validate($0, name: "action[]", parent: name, pattern: "^lex:[a-zA-Z*]+$")
            }
            try self.condition?.forEach {
                try validate($0.key, name: "condition.key", parent: name, min: 1)
                try validate($0.value, name: "condition[\"\($0.key)\"]", parent: name, max: 10)
            }
            try self.validate(self.condition, name: "condition", parent: name, max: 10)
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, max: 5)
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, min: 1)
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, pattern: "^[0-9]+$")
            try self.principal.forEach {
                try $0.validate(name: "\(name).principal[]")
            }
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.statementId, name: "statementId", parent: name, max: 100)
            try self.validate(self.statementId, name: "statementId", parent: name, min: 1)
            try self.validate(self.statementId, name: "statementId", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case action
            case condition
            case effect
            case principal
            case statementId
        }
    }

    public struct CreateResourcePolicyStatementResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
        public let resourceArn: String?
        /// The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
        public let revisionId: String?

        public init(resourceArn: String? = nil, revisionId: String? = nil) {
            self.resourceArn = resourceArn
            self.revisionId = revisionId
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case revisionId
        }
    }

    public struct CreateSlotRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "intentId", location: .uri("intentId")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the bot associated with the slot.
        public let botId: String
        /// The version of the bot associated with the slot.
        public let botVersion: String
        /// A description of the slot. Use this to help identify the slot in lists.
        public let description: String?
        /// The identifier of the intent that contains the slot.
        public let intentId: String
        /// The identifier of the language and locale that the slot will be used in. The string must match one of the supported locales. All of the bots, intents, slot types used by the slot must have the same locale. For more information, see Supported languages.
        public let localeId: String
        /// Indicates whether the slot returns multiple values in one response. Multi-value slots are only available in the en-US locale. If you set this value to true in any other locale, Amazon Lex throws a ValidationException.  If the multipleValuesSetting is not set, the default value is false.
        public let multipleValuesSetting: MultipleValuesSetting?
        /// Determines how slot values are used in Amazon CloudWatch logs. If the value of the obfuscationSetting parameter is DefaultObfuscation, slot values are obfuscated in the log output. If the value is None, the actual value is present in the log output. The default is to obfuscate values in the CloudWatch logs.
        public let obfuscationSetting: ObfuscationSetting?
        /// The name of the slot. Slot names must be unique within the bot that contains the slot.
        public let slotName: String
        /// The unique identifier for the slot type associated with this slot. The slot type determines the values that can be entered into the slot.
        public let slotTypeId: String?
        /// Specifications for the constituent sub slots and the   expression for the composite slot.
        public let subSlotSetting: SubSlotSetting?
        /// Specifies prompts that Amazon Lex sends to the user to elicit a response that provides the value for the slot.
        public let valueElicitationSetting: SlotValueElicitationSetting

        public init(botId: String, botVersion: String, description: String? = nil, intentId: String, localeId: String, multipleValuesSetting: MultipleValuesSetting? = nil, obfuscationSetting: ObfuscationSetting? = nil, slotName: String, slotTypeId: String? = nil, subSlotSetting: SubSlotSetting? = nil, valueElicitationSetting: SlotValueElicitationSetting) {
            self.botId = botId
            self.botVersion = botVersion
            self.description = description
            self.intentId = intentId
            self.localeId = localeId
            self.multipleValuesSetting = multipleValuesSetting
            self.obfuscationSetting = obfuscationSetting
            self.slotName = slotName
            self.slotTypeId = slotTypeId
            self.subSlotSetting = subSlotSetting
            self.valueElicitationSetting = valueElicitationSetting
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.intentId, name: "intentId", parent: name, max: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, min: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.slotName, name: "slotName", parent: name, max: 100)
            try self.validate(self.slotName, name: "slotName", parent: name, min: 1)
            try self.validate(self.slotName, name: "slotName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, max: 25)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, min: 1)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, pattern: "^((AMAZON\\.)[a-zA-Z_]+?|[0-9a-zA-Z]+)$")
            try self.subSlotSetting?.validate(name: "\(name).subSlotSetting")
            try self.valueElicitationSetting.validate(name: "\(name).valueElicitationSetting")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case multipleValuesSetting
            case obfuscationSetting
            case slotName
            case slotTypeId
            case subSlotSetting
            case valueElicitationSetting
        }
    }

    public struct CreateSlotResponse: AWSDecodableShape {
        /// The unique identifier of the bot associated with the slot.
        public let botId: String?
        /// The version of the bot associated with the slot.
        public let botVersion: String?
        /// The timestamp of the date and time that the slot was created.
        public let creationDateTime: Date?
        /// The description associated with the slot.
        public let description: String?
        /// The unique identifier of the intent associated with the slot.
        public let intentId: String?
        /// The language and local specified for the slot.
        public let localeId: String?
        /// Indicates whether the slot returns multiple values in one response.
        public let multipleValuesSetting: MultipleValuesSetting?
        /// Indicates whether the slot is configured to obfuscate values in Amazon CloudWatch logs.
        public let obfuscationSetting: ObfuscationSetting?
        /// The unique identifier associated with the slot. Use this to identify the slot when you update or delete it.
        public let slotId: String?
        /// The name specified for the slot.
        public let slotName: String?
        /// The unique identifier of the slot type associated with this slot.
        public let slotTypeId: String?
        /// Specifications for the constituent sub slots and the   expression for the composite slot.
        public let subSlotSetting: SubSlotSetting?
        /// The value elicitation settings specified for the slot.
        public let valueElicitationSetting: SlotValueElicitationSetting?

        public init(botId: String? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil, intentId: String? = nil, localeId: String? = nil, multipleValuesSetting: MultipleValuesSetting? = nil, obfuscationSetting: ObfuscationSetting? = nil, slotId: String? = nil, slotName: String? = nil, slotTypeId: String? = nil, subSlotSetting: SubSlotSetting? = nil, valueElicitationSetting: SlotValueElicitationSetting? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
            self.intentId = intentId
            self.localeId = localeId
            self.multipleValuesSetting = multipleValuesSetting
            self.obfuscationSetting = obfuscationSetting
            self.slotId = slotId
            self.slotName = slotName
            self.slotTypeId = slotTypeId
            self.subSlotSetting = subSlotSetting
            self.valueElicitationSetting = valueElicitationSetting
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case creationDateTime
            case description
            case intentId
            case localeId
            case multipleValuesSetting
            case obfuscationSetting
            case slotId
            case slotName
            case slotTypeId
            case subSlotSetting
            case valueElicitationSetting
        }
    }

    public struct CreateSlotTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the bot associated with this slot type.
        public let botId: String
        /// The identifier of the bot version associated with this slot type.
        public let botVersion: String
        /// Specifications for a composite slot type.
        public let compositeSlotTypeSetting: CompositeSlotTypeSetting?
        /// A description of the slot type. Use the description to help identify the slot type in lists.
        public let description: String?
        /// Sets the type of external information used to create the slot type.
        public let externalSourceSetting: ExternalSourceSetting?
        /// The identifier of the language and locale that the slot type will be used in. The string must match one of the supported locales. All of the bots, intents, and slots used by the slot type must have the same locale. For more information, see Supported languages.
        public let localeId: String
        /// The built-in slot type used as a parent of this slot type. When you define a parent slot type, the new slot type has the configuration of the parent slot type. Only AMAZON.AlphaNumeric is supported.
        public let parentSlotTypeSignature: String?
        /// The name for the slot. A slot type name must be unique within the account.
        public let slotTypeName: String
        /// A list of SlotTypeValue objects that defines the values that the slot type can take. Each value can have a list of synonyms, additional values that help train the machine learning model about the values that it resolves for a slot.
        public let slotTypeValues: [SlotTypeValue]?
        /// Determines the strategy that Amazon Lex uses to select a value from the list of possible values. The field can be set to one of the following values:    OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.    TopResolution - If there is a resolution list for the slot, return the first value in the resolution list. If there is no resolution list, return null.   If you don't specify the valueSelectionSetting parameter, the default is OriginalValue.
        public let valueSelectionSetting: SlotValueSelectionSetting?

        public init(botId: String, botVersion: String, compositeSlotTypeSetting: CompositeSlotTypeSetting? = nil, description: String? = nil, externalSourceSetting: ExternalSourceSetting? = nil, localeId: String, parentSlotTypeSignature: String? = nil, slotTypeName: String, slotTypeValues: [SlotTypeValue]? = nil, valueSelectionSetting: SlotValueSelectionSetting? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.compositeSlotTypeSetting = compositeSlotTypeSetting
            self.description = description
            self.externalSourceSetting = externalSourceSetting
            self.localeId = localeId
            self.parentSlotTypeSignature = parentSlotTypeSignature
            self.slotTypeName = slotTypeName
            self.slotTypeValues = slotTypeValues
            self.valueSelectionSetting = valueSelectionSetting
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.compositeSlotTypeSetting?.validate(name: "\(name).compositeSlotTypeSetting")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.externalSourceSetting?.validate(name: "\(name).externalSourceSetting")
            try self.validate(self.slotTypeName, name: "slotTypeName", parent: name, max: 100)
            try self.validate(self.slotTypeName, name: "slotTypeName", parent: name, min: 1)
            try self.validate(self.slotTypeName, name: "slotTypeName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.slotTypeValues?.forEach {
                try $0.validate(name: "\(name).slotTypeValues[]")
            }
            try self.validate(self.slotTypeValues, name: "slotTypeValues", parent: name, max: 10000)
            try self.validate(self.slotTypeValues, name: "slotTypeValues", parent: name, min: 1)
            try self.valueSelectionSetting?.validate(name: "\(name).valueSelectionSetting")
        }

        private enum CodingKeys: String, CodingKey {
            case compositeSlotTypeSetting
            case description
            case externalSourceSetting
            case parentSlotTypeSignature
            case slotTypeName
            case slotTypeValues
            case valueSelectionSetting
        }
    }

    public struct CreateSlotTypeResponse: AWSDecodableShape {
        /// The identifier for the bot associated with the slot type.
        public let botId: String?
        /// The version of the bot associated with the slot type.
        public let botVersion: String?
        /// Specifications for a composite slot type.
        public let compositeSlotTypeSetting: CompositeSlotTypeSetting?
        /// A timestamp of the date and time that the slot type was created.
        public let creationDateTime: Date?
        /// The description specified for the slot type.
        public let description: String?
        /// The type of external information used to create the slot type.
        public let externalSourceSetting: ExternalSourceSetting?
        /// The specified language and local specified for the slot type.
        public let localeId: String?
        /// The signature of the base slot type specified for the slot type.
        public let parentSlotTypeSignature: String?
        /// The unique identifier assigned to the slot type. Use this to identify the slot type in the UpdateSlotType and DeleteSlotType operations.
        public let slotTypeId: String?
        /// The name specified for the slot type.
        public let slotTypeName: String?
        /// The list of values that the slot type can assume.
        public let slotTypeValues: [SlotTypeValue]?
        /// The strategy that Amazon Lex uses to select a value from the list of possible values.
        public let valueSelectionSetting: SlotValueSelectionSetting?

        public init(botId: String? = nil, botVersion: String? = nil, compositeSlotTypeSetting: CompositeSlotTypeSetting? = nil, creationDateTime: Date? = nil, description: String? = nil, externalSourceSetting: ExternalSourceSetting? = nil, localeId: String? = nil, parentSlotTypeSignature: String? = nil, slotTypeId: String? = nil, slotTypeName: String? = nil, slotTypeValues: [SlotTypeValue]? = nil, valueSelectionSetting: SlotValueSelectionSetting? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.compositeSlotTypeSetting = compositeSlotTypeSetting
            self.creationDateTime = creationDateTime
            self.description = description
            self.externalSourceSetting = externalSourceSetting
            self.localeId = localeId
            self.parentSlotTypeSignature = parentSlotTypeSignature
            self.slotTypeId = slotTypeId
            self.slotTypeName = slotTypeName
            self.slotTypeValues = slotTypeValues
            self.valueSelectionSetting = valueSelectionSetting
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case compositeSlotTypeSetting
            case creationDateTime
            case description
            case externalSourceSetting
            case localeId
            case parentSlotTypeSignature
            case slotTypeId
            case slotTypeName
            case slotTypeValues
            case valueSelectionSetting
        }
    }

    public struct CreateUploadUrlRequest: AWSEncodableShape {
        public init() {}
    }

    public struct CreateUploadUrlResponse: AWSDecodableShape {
        /// An identifier for a unique import job. Use it when you call the StartImport operation.
        public let importId: String?
        /// A pre-signed S3 write URL. Upload the zip archive file that contains the definition of your bot or bot locale.
        public let uploadUrl: String?

        public init(importId: String? = nil, uploadUrl: String? = nil) {
            self.importId = importId
            self.uploadUrl = uploadUrl
        }

        private enum CodingKeys: String, CodingKey {
            case importId
            case uploadUrl
        }
    }

    public struct CustomPayload: AWSEncodableShape & AWSDecodableShape {
        /// The string that is sent to your application.
        public let value: String

        public init(value: String) {
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.value, name: "value", parent: name, max: 1000)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case value
        }
    }

    public struct CustomVocabularyEntryId: AWSEncodableShape {
        /// The unique item identifier for the custom vocabulary items.
        public let itemId: String

        public init(itemId: String) {
            self.itemId = itemId
        }

        public func validate(name: String) throws {
            try self.validate(self.itemId, name: "itemId", parent: name, max: 32)
            try self.validate(self.itemId, name: "itemId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case itemId
        }
    }

    public struct CustomVocabularyExportSpecification: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the bot that contains the custom vocabulary to export.
        public let botId: String
        /// The version of the bot that contains the custom vocabulary to export.
        public let botVersion: String
        /// The locale of the bot that contains the custom vocabulary to export.
        public let localeId: String

        public init(botId: String, botVersion: String, localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case localeId
        }
    }

    public struct CustomVocabularyImportSpecification: AWSEncodableShape & AWSDecodableShape {
        /// The identifier of the bot to import the custom vocabulary to.
        public let botId: String
        /// The version of the bot to import the custom vocabulary to.
        public let botVersion: String
        /// The identifier of the local to import the custom vocabulary to. The value must be en_GB.
        public let localeId: String

        public init(botId: String, botVersion: String, localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case localeId
        }
    }

    public struct CustomVocabularyItem: AWSEncodableShape & AWSDecodableShape {
        /// The display as value for the custom vocabulary item  from the custom vocabulary list.
        public let displayAs: String?
        /// The unique item identifer for the custom vocabulary item  from the custom vocabulary list.
        public let itemId: String
        /// The unique phrase for the custom vocabulary item  from the custom vocabulary list.
        public let phrase: String
        /// The weight assigned for the custom vocabulary item  from the custom vocabulary list.
        public let weight: Int?

        public init(displayAs: String? = nil, itemId: String, phrase: String, weight: Int? = nil) {
            self.displayAs = displayAs
            self.itemId = itemId
            self.phrase = phrase
            self.weight = weight
        }

        public func validate(name: String) throws {
            try self.validate(self.displayAs, name: "displayAs", parent: name, max: 100)
            try self.validate(self.displayAs, name: "displayAs", parent: name, min: 1)
            try self.validate(self.itemId, name: "itemId", parent: name, max: 32)
            try self.validate(self.itemId, name: "itemId", parent: name, min: 1)
            try self.validate(self.phrase, name: "phrase", parent: name, max: 100)
            try self.validate(self.phrase, name: "phrase", parent: name, min: 1)
            try self.validate(self.weight, name: "weight", parent: name, max: 3)
            try self.validate(self.weight, name: "weight", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case displayAs
            case itemId
            case phrase
            case weight
        }
    }

    public struct DTMFSpecification: AWSEncodableShape & AWSDecodableShape {
        /// The DTMF character that clears the accumulated DTMF digits and immediately ends  the input.
        public let deletionCharacter: String
        /// The DTMF character that immediately ends input. If the user does not press this  character, the input ends after the end timeout.
        public let endCharacter: String
        /// How long the bot should wait after the last DTMF character input before assuming  that the input has concluded.
        public let endTimeoutMs: Int
        /// The maximum number of DTMF digits allowed in an utterance.
        public let maxLength: Int

        public init(deletionCharacter: String, endCharacter: String, endTimeoutMs: Int, maxLength: Int) {
            self.deletionCharacter = deletionCharacter
            self.endCharacter = endCharacter
            self.endTimeoutMs = endTimeoutMs
            self.maxLength = maxLength
        }

        public func validate(name: String) throws {
            try self.validate(self.deletionCharacter, name: "deletionCharacter", parent: name, pattern: "^[A-D0-9#*]{1}$")
            try self.validate(self.endCharacter, name: "endCharacter", parent: name, pattern: "^[A-D0-9#*]{1}$")
            try self.validate(self.endTimeoutMs, name: "endTimeoutMs", parent: name, min: 1)
            try self.validate(self.maxLength, name: "maxLength", parent: name, max: 1024)
            try self.validate(self.maxLength, name: "maxLength", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deletionCharacter
            case endCharacter
            case endTimeoutMs
            case maxLength
        }
    }

    public struct DataPrivacy: AWSEncodableShape & AWSDecodableShape {
        /// For each Amazon Lex bot created with the Amazon Lex Model Building Service, you must specify whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to the Children's Online Privacy Protection Act (COPPA) by specifying true or false in the childDirected field. By specifying true in the childDirected field, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. By specifying false in the childDirected field, you confirm that your use of Amazon Lex is not related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. You may not specify a default value for the childDirected field that does not accurately reflect whether your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. If your use of Amazon Lex relates to a website, program, or other application that is directed in whole or in part, to children under age 13, you must obtain any required verifiable parental consent under COPPA. For information regarding the use of Amazon Lex in connection with websites, programs, or other applications that are directed or targeted, in whole or in part, to children under age 13, see the Amazon Lex FAQ.
        public let childDirected: Bool

        public init(childDirected: Bool) {
            self.childDirected = childDirected
        }

        private enum CodingKeys: String, CodingKey {
            case childDirected
        }
    }

    public struct DateRangeFilter: AWSEncodableShape & AWSDecodableShape {
        /// A timestamp indicating the end date for the date range filter.
        public let endDateTime: Date
        /// A timestamp indicating the start date for the date range filter.
        public let startDateTime: Date

        public init(endDateTime: Date, startDateTime: Date) {
            self.endDateTime = endDateTime
            self.startDateTime = startDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case endDateTime
            case startDateTime
        }
    }

    public struct DefaultConditionalBranch: AWSEncodableShape & AWSDecodableShape {
        /// The next step in the conversation.
        public let nextStep: DialogState?
        public let response: ResponseSpecification?

        public init(nextStep: DialogState? = nil, response: ResponseSpecification? = nil) {
            self.nextStep = nextStep
            self.response = response
        }

        public func validate(name: String) throws {
            try self.nextStep?.validate(name: "\(name).nextStep")
            try self.response?.validate(name: "\(name).response")
        }

        private enum CodingKeys: String, CodingKey {
            case nextStep
            case response
        }
    }

    public struct DeleteBotAliasRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botAliasId", location: .uri("botAliasId")),
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "skipResourceInUseCheck", location: .querystring("skipResourceInUseCheck"))
        ]

        /// The unique identifier of the bot alias to delete.
        public let botAliasId: String
        /// The unique identifier of the bot associated with the alias to delete.
        public let botId: String
        /// When this parameter is true, Amazon Lex doesn't check to see if any other resource is using the alias before it is deleted.
        public let skipResourceInUseCheck: Bool?

        public init(botAliasId: String, botId: String, skipResourceInUseCheck: Bool? = nil) {
            self.botAliasId = botAliasId
            self.botId = botId
            self.skipResourceInUseCheck = skipResourceInUseCheck
        }

        public func validate(name: String) throws {
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, max: 10)
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, min: 10)
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, pattern: "^(\\bTSTALIASID\\b|[0-9a-zA-Z]+)$")
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBotAliasResponse: AWSDecodableShape {
        /// The unique identifier of the bot alias to delete.
        public let botAliasId: String?
        /// The current status of the alias. The status is Deleting while the alias is in the process of being deleted. Once the alias is deleted, it will no longer appear in the list of aliases returned by the ListBotAliases operation.
        public let botAliasStatus: BotAliasStatus?
        /// The unique identifier of the bot that contains the alias to delete.
        public let botId: String?

        public init(botAliasId: String? = nil, botAliasStatus: BotAliasStatus? = nil, botId: String? = nil) {
            self.botAliasId = botAliasId
            self.botAliasStatus = botAliasStatus
            self.botId = botId
        }

        private enum CodingKeys: String, CodingKey {
            case botAliasId
            case botAliasStatus
            case botId
        }
    }

    public struct DeleteBotLocaleRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot that contains the locale.
        public let botId: String
        /// The version of the bot that contains the locale.
        public let botVersion: String
        /// The identifier of the language and locale that will be deleted. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String

        public init(botId: String, botVersion: String, localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBotLocaleResponse: AWSDecodableShape {
        /// The identifier of the bot that contained the deleted locale.
        public let botId: String?
        /// The status of deleting the bot locale. The locale first enters the Deleting status. Once the locale is deleted it no longer appears in the list of locales for the bot.
        public let botLocaleStatus: BotLocaleStatus?
        /// The version of the bot that contained the deleted locale.
        public let botVersion: String?
        /// The language and locale of the deleted locale.
        public let localeId: String?

        public init(botId: String? = nil, botLocaleStatus: BotLocaleStatus? = nil, botVersion: String? = nil, localeId: String? = nil) {
            self.botId = botId
            self.botLocaleStatus = botLocaleStatus
            self.botVersion = botVersion
            self.localeId = localeId
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botLocaleStatus
            case botVersion
            case localeId
        }
    }

    public struct DeleteBotRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "skipResourceInUseCheck", location: .querystring("skipResourceInUseCheck"))
        ]

        /// The identifier of the bot to delete.
        public let botId: String
        /// When true, Amazon Lex doesn't check to see if another resource, such as an alias, is using the bot before it is deleted.
        public let skipResourceInUseCheck: Bool?

        public init(botId: String, skipResourceInUseCheck: Bool? = nil) {
            self.botId = botId
            self.skipResourceInUseCheck = skipResourceInUseCheck
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBotResponse: AWSDecodableShape {
        /// The unique identifier of the bot that Amazon Lex is deleting.
        public let botId: String?
        /// The current status of the bot. The status is Deleting while the bot and its associated resources are being deleted.
        public let botStatus: BotStatus?

        public init(botId: String? = nil, botStatus: BotStatus? = nil) {
            self.botId = botId
            self.botStatus = botStatus
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botStatus
        }
    }

    public struct DeleteBotVersionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "skipResourceInUseCheck", location: .querystring("skipResourceInUseCheck"))
        ]

        /// The identifier of the bot that contains the version.
        public let botId: String
        /// The version of the bot to delete.
        public let botVersion: String
        /// By default, the DeleteBotVersion operations throws a ResourceInUseException exception if you try to delete a bot version that has an alias pointing at it. Set the skipResourceInUseCheck parameter to true to skip this check and remove the version even if an alias points to it.
        public let skipResourceInUseCheck: Bool?

        public init(botId: String, botVersion: String, skipResourceInUseCheck: Bool? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.skipResourceInUseCheck = skipResourceInUseCheck
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBotVersionResponse: AWSDecodableShape {
        /// The identifier of the bot that is being deleted.
        public let botId: String?
        /// The current status of the bot.
        public let botStatus: BotStatus?
        /// The version of the bot that is being deleted.
        public let botVersion: String?

        public init(botId: String? = nil, botStatus: BotStatus? = nil, botVersion: String? = nil) {
            self.botId = botId
            self.botStatus = botStatus
            self.botVersion = botVersion
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botStatus
            case botVersion
        }
    }

    public struct DeleteCustomVocabularyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot to remove the custom vocabulary from.
        public let botId: String
        /// The version of the bot to remove the custom vocabulary from.
        public let botVersion: String
        /// The locale identifier for the locale that contains the custom vocabulary to remove.
        public let localeId: String

        public init(botId: String, botVersion: String, localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCustomVocabularyResponse: AWSDecodableShape {
        /// The identifier of the bot that the custom vocabulary was removed from.
        public let botId: String?
        /// The version of the bot that the custom vocabulary was removed from.
        public let botVersion: String?
        /// The status of removing the custom vocabulary.
        public let customVocabularyStatus: CustomVocabularyStatus?
        /// The locale identifier for the locale that the custom vocabulary was removed from.
        public let localeId: String?

        public init(botId: String? = nil, botVersion: String? = nil, customVocabularyStatus: CustomVocabularyStatus? = nil, localeId: String? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.customVocabularyStatus = customVocabularyStatus
            self.localeId = localeId
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case customVocabularyStatus
            case localeId
        }
    }

    public struct DeleteExportRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "exportId", location: .uri("exportId"))
        ]

        /// The unique identifier of the export to delete.
        public let exportId: String

        public init(exportId: String) {
            self.exportId = exportId
        }

        public func validate(name: String) throws {
            try self.validate(self.exportId, name: "exportId", parent: name, max: 10)
            try self.validate(self.exportId, name: "exportId", parent: name, min: 10)
            try self.validate(self.exportId, name: "exportId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteExportResponse: AWSDecodableShape {
        /// The unique identifier of the deleted export.
        public let exportId: String?
        /// The current status of the deletion. When the deletion is complete, the export will no longer be returned by the ListExports operation and calls to the  DescribeExport operation with the export identifier will fail.
        public let exportStatus: ExportStatus?

        public init(exportId: String? = nil, exportStatus: ExportStatus? = nil) {
            self.exportId = exportId
            self.exportStatus = exportStatus
        }

        private enum CodingKeys: String, CodingKey {
            case exportId
            case exportStatus
        }
    }

    public struct DeleteImportRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "importId", location: .uri("importId"))
        ]

        /// The unique identifier of the import to delete.
        public let importId: String

        public init(importId: String) {
            self.importId = importId
        }

        public func validate(name: String) throws {
            try self.validate(self.importId, name: "importId", parent: name, max: 10)
            try self.validate(self.importId, name: "importId", parent: name, min: 10)
            try self.validate(self.importId, name: "importId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteImportResponse: AWSDecodableShape {
        /// The unique identifier of the deleted import.
        public let importId: String?
        /// The current status of the deletion. When the deletion is complete, the import will no longer be returned by the ListImports operation and calls to the DescribeImport operation with the import identifier will fail.
        public let importStatus: ImportStatus?

        public init(importId: String? = nil, importStatus: ImportStatus? = nil) {
            self.importId = importId
            self.importStatus = importStatus
        }

        private enum CodingKeys: String, CodingKey {
            case importId
            case importStatus
        }
    }

    public struct DeleteIntentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "intentId", location: .uri("intentId")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the bot associated with the intent.
        public let botId: String
        /// The version of the bot associated with the intent.
        public let botVersion: String
        /// The unique identifier of the intent to delete.
        public let intentId: String
        /// The identifier of the language and locale where the bot will be deleted. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String

        public init(botId: String, botVersion: String, intentId: String, localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.intentId = intentId
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.intentId, name: "intentId", parent: name, max: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, min: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteResourcePolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "expectedRevisionId", location: .querystring("expectedRevisionId")),
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The identifier of the revision to edit. If this ID doesn't match the current revision number, Amazon Lex returns an exception If you don't specify a revision ID, Amazon Lex will delete the current policy.
        public let expectedRevisionId: String?
        /// The Amazon Resource Name (ARN) of the bot or bot alias that has the resource policy attached.
        public let resourceArn: String

        public init(expectedRevisionId: String? = nil, resourceArn: String) {
            self.expectedRevisionId = expectedRevisionId
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, max: 5)
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, min: 1)
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteResourcePolicyResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy was deleted from.
        public let resourceArn: String?
        /// The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
        public let revisionId: String?

        public init(resourceArn: String? = nil, revisionId: String? = nil) {
            self.resourceArn = resourceArn
            self.revisionId = revisionId
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case revisionId
        }
    }

    public struct DeleteResourcePolicyStatementRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "expectedRevisionId", location: .querystring("expectedRevisionId")),
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn")),
            AWSMemberEncoding(label: "statementId", location: .uri("statementId"))
        ]

        /// The identifier of the revision of the policy to delete the statement from. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception. If you don't specify a revision, Amazon Lex removes the current contents of the statement.
        public let expectedRevisionId: String?
        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
        public let resourceArn: String
        /// The name of the statement (SID) to delete from the policy.
        public let statementId: String

        public init(expectedRevisionId: String? = nil, resourceArn: String, statementId: String) {
            self.expectedRevisionId = expectedRevisionId
            self.resourceArn = resourceArn
            self.statementId = statementId
        }

        public func validate(name: String) throws {
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, max: 5)
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, min: 1)
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.statementId, name: "statementId", parent: name, max: 100)
            try self.validate(self.statementId, name: "statementId", parent: name, min: 1)
            try self.validate(self.statementId, name: "statementId", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteResourcePolicyStatementResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy statement was removed from.
        public let resourceArn: String?
        /// The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
        public let revisionId: String?

        public init(resourceArn: String? = nil, revisionId: String? = nil) {
            self.resourceArn = resourceArn
            self.revisionId = revisionId
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case revisionId
        }
    }

    public struct DeleteSlotRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "intentId", location: .uri("intentId")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId")),
            AWSMemberEncoding(label: "slotId", location: .uri("slotId"))
        ]

        /// The identifier of the bot associated with the slot to delete.
        public let botId: String
        /// The version of the bot associated with the slot to delete.
        public let botVersion: String
        /// The identifier of the intent associated with the slot.
        public let intentId: String
        /// The identifier of the language and locale that the slot will be deleted from. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// The identifier of the slot to delete.
        public let slotId: String

        public init(botId: String, botVersion: String, intentId: String, localeId: String, slotId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.intentId = intentId
            self.localeId = localeId
            self.slotId = slotId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.intentId, name: "intentId", parent: name, max: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, min: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.slotId, name: "slotId", parent: name, max: 10)
            try self.validate(self.slotId, name: "slotId", parent: name, min: 10)
            try self.validate(self.slotId, name: "slotId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteSlotTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId")),
            AWSMemberEncoding(label: "skipResourceInUseCheck", location: .querystring("skipResourceInUseCheck")),
            AWSMemberEncoding(label: "slotTypeId", location: .uri("slotTypeId"))
        ]

        /// The identifier of the bot associated with the slot type.
        public let botId: String
        /// The version of the bot associated with the slot type.
        public let botVersion: String
        /// The identifier of the language and locale that the slot type will be deleted from. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// By default, the DeleteSlotType operations throws a ResourceInUseException exception if you try to delete a slot type used by a slot. Set the skipResourceInUseCheck parameter to true to skip this check and remove the slot type even if a slot uses it.
        public let skipResourceInUseCheck: Bool?
        /// The identifier of the slot type to delete.
        public let slotTypeId: String

        public init(botId: String, botVersion: String, localeId: String, skipResourceInUseCheck: Bool? = nil, slotTypeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
            self.skipResourceInUseCheck = skipResourceInUseCheck
            self.slotTypeId = slotTypeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, max: 10)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, min: 10)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteUtterancesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "localeId", location: .querystring("localeId")),
            AWSMemberEncoding(label: "sessionId", location: .querystring("sessionId"))
        ]

        /// The unique identifier of the bot that contains the utterances.
        public let botId: String
        /// The identifier of the language and locale where the utterances were collected. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String?
        /// The unique identifier of the session with the user. The ID is returned in the response from the RecognizeText and RecognizeUtterance operations.
        public let sessionId: String?

        public init(botId: String, localeId: String? = nil, sessionId: String? = nil) {
            self.botId = botId
            self.localeId = localeId
            self.sessionId = sessionId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.sessionId, name: "sessionId", parent: name, max: 100)
            try self.validate(self.sessionId, name: "sessionId", parent: name, min: 2)
            try self.validate(self.sessionId, name: "sessionId", parent: name, pattern: "^[0-9a-zA-Z._:-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteUtterancesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeBotAliasRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botAliasId", location: .uri("botAliasId")),
            AWSMemberEncoding(label: "botId", location: .uri("botId"))
        ]

        /// The identifier of the bot alias to describe.
        public let botAliasId: String
        /// The identifier of the bot associated with the bot alias to describe.
        public let botId: String

        public init(botAliasId: String, botId: String) {
            self.botAliasId = botAliasId
            self.botId = botId
        }

        public func validate(name: String) throws {
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, max: 10)
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, min: 10)
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, pattern: "^(\\bTSTALIASID\\b|[0-9a-zA-Z]+)$")
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeBotAliasResponse: AWSDecodableShape {
        /// A list of events that affect a bot alias. For example, an event is recorded when the version that the alias points to changes.
        public let botAliasHistoryEvents: [BotAliasHistoryEvent]?
        /// The identifier of the bot alias.
        public let botAliasId: String?
        /// The locale settings that are unique to the alias.
        public let botAliasLocaleSettings: [String: BotAliasLocaleSettings]?
        /// The name of the bot alias.
        public let botAliasName: String?
        /// The current status of the alias. When the alias is Available, the alias is ready for use with your bot.
        public let botAliasStatus: BotAliasStatus?
        /// The identifier of the bot associated with the bot alias.
        public let botId: String?
        /// The version of the bot associated with the bot alias.
        public let botVersion: String?
        /// Specifics of how Amazon Lex logs text and audio conversations with the bot associated with the alias.
        public let conversationLogSettings: ConversationLogSettings?
        /// A timestamp of the date and time that the alias was created.
        public let creationDateTime: Date?
        /// The description of the bot alias.
        public let description: String?
        /// A timestamp of the date and time that the alias was last updated.
        public let lastUpdatedDateTime: Date?
        public let sentimentAnalysisSettings: SentimentAnalysisSettings?

        public init(botAliasHistoryEvents: [BotAliasHistoryEvent]? = nil, botAliasId: String? = nil, botAliasLocaleSettings: [String: BotAliasLocaleSettings]? = nil, botAliasName: String? = nil, botAliasStatus: BotAliasStatus? = nil, botId: String? = nil, botVersion: String? = nil, conversationLogSettings: ConversationLogSettings? = nil, creationDateTime: Date? = nil, description: String? = nil, lastUpdatedDateTime: Date? = nil, sentimentAnalysisSettings: SentimentAnalysisSettings? = nil) {
            self.botAliasHistoryEvents = botAliasHistoryEvents
            self.botAliasId = botAliasId
            self.botAliasLocaleSettings = botAliasLocaleSettings
            self.botAliasName = botAliasName
            self.botAliasStatus = botAliasStatus
            self.botId = botId
            self.botVersion = botVersion
            self.conversationLogSettings = conversationLogSettings
            self.creationDateTime = creationDateTime
            self.description = description
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.sentimentAnalysisSettings = sentimentAnalysisSettings
        }

        private enum CodingKeys: String, CodingKey {
            case botAliasHistoryEvents
            case botAliasId
            case botAliasLocaleSettings
            case botAliasName
            case botAliasStatus
            case botId
            case botVersion
            case conversationLogSettings
            case creationDateTime
            case description
            case lastUpdatedDateTime
            case sentimentAnalysisSettings
        }
    }

    public struct DescribeBotLocaleRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the bot associated with the locale.
        public let botId: String
        /// The identifier of the version of the bot associated with the locale.
        public let botVersion: String
        /// The unique identifier of the locale to describe. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String

        public init(botId: String, botVersion: String, localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeBotLocaleResponse: AWSDecodableShape {
        /// The identifier of the bot associated with the locale.
        public let botId: String?
        /// History of changes, such as when a locale is used in an alias, that have taken place for the locale.
        public let botLocaleHistoryEvents: [BotLocaleHistoryEvent]?
        /// The status of the bot. If the status is Failed, the reasons for the failure are listed in the failureReasons field.
        public let botLocaleStatus: BotLocaleStatus?
        /// The identifier of the version of the bot associated with the locale.
        public let botVersion: String?
        /// The date and time that the locale was created.
        public let creationDateTime: Date?
        /// The description of the locale.
        public let description: String?
        /// if botLocaleStatus is Failed, Amazon Lex explains why it failed to build the bot.
        public let failureReasons: [String]?
        /// The number of intents defined for the locale.
        public let intentsCount: Int?
        /// The date and time that the locale was last submitted for building.
        public let lastBuildSubmittedDateTime: Date?
        /// The date and time that the locale was last updated.
        public let lastUpdatedDateTime: Date?
        /// The unique identifier of the described locale.
        public let localeId: String?
        /// The name of the locale.
        public let localeName: String?
        /// The confidence threshold where Amazon Lex inserts the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents in the list of possible intents for an utterance.
        public let nluIntentConfidenceThreshold: Double?
        /// Recommended actions to take to resolve an error in the failureReasons field.
        public let recommendedActions: [String]?
        /// The number of slot types defined for the locale.
        public let slotTypesCount: Int?
        /// The Amazon Polly voice Amazon Lex uses for voice interaction with the user.
        public let voiceSettings: VoiceSettings?

        public init(botId: String? = nil, botLocaleHistoryEvents: [BotLocaleHistoryEvent]? = nil, botLocaleStatus: BotLocaleStatus? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil, failureReasons: [String]? = nil, intentsCount: Int? = nil, lastBuildSubmittedDateTime: Date? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, localeName: String? = nil, nluIntentConfidenceThreshold: Double? = nil, recommendedActions: [String]? = nil, slotTypesCount: Int? = nil, voiceSettings: VoiceSettings? = nil) {
            self.botId = botId
            self.botLocaleHistoryEvents = botLocaleHistoryEvents
            self.botLocaleStatus = botLocaleStatus
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
            self.failureReasons = failureReasons
            self.intentsCount = intentsCount
            self.lastBuildSubmittedDateTime = lastBuildSubmittedDateTime
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.localeName = localeName
            self.nluIntentConfidenceThreshold = nluIntentConfidenceThreshold
            self.recommendedActions = recommendedActions
            self.slotTypesCount = slotTypesCount
            self.voiceSettings = voiceSettings
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botLocaleHistoryEvents
            case botLocaleStatus
            case botVersion
            case creationDateTime
            case description
            case failureReasons
            case intentsCount
            case lastBuildSubmittedDateTime
            case lastUpdatedDateTime
            case localeId
            case localeName
            case nluIntentConfidenceThreshold
            case recommendedActions
            case slotTypesCount
            case voiceSettings
        }
    }

    public struct DescribeBotRecommendationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botRecommendationId", location: .uri("botRecommendationId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot associated with the bot recommendation.
        public let botId: String
        /// The identifier of the bot recommendation to describe.
        public let botRecommendationId: String
        /// The version of the bot associated with the bot recommendation.
        public let botVersion: String
        /// The identifier of the language and locale of the bot recommendation to describe. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String

        public init(botId: String, botRecommendationId: String, botVersion: String, localeId: String) {
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botVersion = botVersion
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, max: 10)
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, min: 10)
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeBotRecommendationResponse: AWSDecodableShape {
        /// The identifier of the bot associated with the bot recommendation.
        public let botId: String?
        /// The identifier of the bot recommendation being described.
        public let botRecommendationId: String?
        /// The object representing the URL of the bot definition, the URL of the associated transcript and a statistical summary of the bot recommendation results.
        public let botRecommendationResults: BotRecommendationResults?
        /// The status of the bot recommendation. If the status is Failed, then the reasons for the failure are listed in the failureReasons field.
        public let botRecommendationStatus: BotRecommendationStatus?
        /// The version of the bot associated with the bot recommendation.
        public let botVersion: String?
        /// The date and time that the bot recommendation was created.
        public let creationDateTime: Date?
        /// The object representing the passwords that were used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.
        public let encryptionSetting: EncryptionSetting?
        /// If botRecommendationStatus is Failed, Amazon Lex explains why.
        public let failureReasons: [String]?
        /// The date and time that the bot recommendation was last updated.
        public let lastUpdatedDateTime: Date?
        /// The identifier of the language and locale of the bot recommendation to describe.
        public let localeId: String?
        /// The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.
        public let transcriptSourceSetting: TranscriptSourceSetting?

        public init(botId: String? = nil, botRecommendationId: String? = nil, botRecommendationResults: BotRecommendationResults? = nil, botRecommendationStatus: BotRecommendationStatus? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, encryptionSetting: EncryptionSetting? = nil, failureReasons: [String]? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, transcriptSourceSetting: TranscriptSourceSetting? = nil) {
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botRecommendationResults = botRecommendationResults
            self.botRecommendationStatus = botRecommendationStatus
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.encryptionSetting = encryptionSetting
            self.failureReasons = failureReasons
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.transcriptSourceSetting = transcriptSourceSetting
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botRecommendationId
            case botRecommendationResults
            case botRecommendationStatus
            case botVersion
            case creationDateTime
            case encryptionSetting
            case failureReasons
            case lastUpdatedDateTime
            case localeId
            case transcriptSourceSetting
        }
    }

    public struct DescribeBotRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId"))
        ]

        /// The unique identifier of the bot to describe.
        public let botId: String

        public init(botId: String) {
            self.botId = botId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeBotResponse: AWSDecodableShape {
        /// The unique identifier of the bot.
        public let botId: String?
        /// The name of the bot.
        public let botName: String?
        /// The current status of the bot. When the status is Available the bot is ready to be used in conversations with users.
        public let botStatus: BotStatus?
        /// A timestamp of the date and time that the bot was created.
        public let creationDateTime: Date?
        /// Settings for managing data privacy of the bot and its conversations with users.
        public let dataPrivacy: DataPrivacy?
        /// The description of the bot.
        public let description: String?
        /// The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.
        public let idleSessionTTLInSeconds: Int?
        /// A timestamp of the date and time that the bot was last updated.
        public let lastUpdatedDateTime: Date?
        /// The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot.
        public let roleArn: String?

        public init(botId: String? = nil, botName: String? = nil, botStatus: BotStatus? = nil, creationDateTime: Date? = nil, dataPrivacy: DataPrivacy? = nil, description: String? = nil, idleSessionTTLInSeconds: Int? = nil, lastUpdatedDateTime: Date? = nil, roleArn: String? = nil) {
            self.botId = botId
            self.botName = botName
            self.botStatus = botStatus
            self.creationDateTime = creationDateTime
            self.dataPrivacy = dataPrivacy
            self.description = description
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botName
            case botStatus
            case creationDateTime
            case dataPrivacy
            case description
            case idleSessionTTLInSeconds
            case lastUpdatedDateTime
            case roleArn
        }
    }

    public struct DescribeBotVersionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion"))
        ]

        /// The identifier of the bot containing the version to return metadata for.
        public let botId: String
        /// The version of the bot to return metadata for.
        public let botVersion: String

        public init(botId: String, botVersion: String) {
            self.botId = botId
            self.botVersion = botVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeBotVersionResponse: AWSDecodableShape {
        /// The identifier of the bot that contains the version.
        public let botId: String?
        /// The name of the bot that contains the version.
        public let botName: String?
        /// The current status of the bot. When the status is Available, the bot version is ready for use.
        public let botStatus: BotStatus?
        /// The version of the bot to describe.
        public let botVersion: String?
        /// A timestamp of the date and time that the bot version was created.
        public let creationDateTime: Date?
        /// Data privacy settings for the bot version.
        public let dataPrivacy: DataPrivacy?
        /// The description specified for the bot.
        public let description: String?
        /// If the botStatus is Failed, this contains a list of reasons that the version couldn't be built.
        public let failureReasons: [String]?
        /// The number of seconds that a session with the bot remains active before it is discarded by Amazon Lex.
        public let idleSessionTTLInSeconds: Int?
        /// The Amazon Resource Name (ARN) of an IAM role that has permission to access the bot version.
        public let roleArn: String?

        public init(botId: String? = nil, botName: String? = nil, botStatus: BotStatus? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, dataPrivacy: DataPrivacy? = nil, description: String? = nil, failureReasons: [String]? = nil, idleSessionTTLInSeconds: Int? = nil, roleArn: String? = nil) {
            self.botId = botId
            self.botName = botName
            self.botStatus = botStatus
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.dataPrivacy = dataPrivacy
            self.description = description
            self.failureReasons = failureReasons
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botName
            case botStatus
            case botVersion
            case creationDateTime
            case dataPrivacy
            case description
            case failureReasons
            case idleSessionTTLInSeconds
            case roleArn
        }
    }

    public struct DescribeCustomVocabularyMetadataRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot that contains the custom vocabulary.
        public let botId: String
        /// The bot version of the bot to return metadata for.
        public let botVersion: String
        /// The locale to return the custom vocabulary information for. The locale must be en_GB.
        public let localeId: String

        public init(botId: String, botVersion: String, localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeCustomVocabularyMetadataResponse: AWSDecodableShape {
        /// The identifier of the bot that contains the custom vocabulary.
        public let botId: String?
        /// The version of the bot that contains the custom vocabulary to describe.
        public let botVersion: String?
        /// The date and time that the custom vocabulary was created.
        public let creationDateTime: Date?
        /// The status of the custom vocabulary. If the status is  Ready the custom vocabulary is ready to use.
        public let customVocabularyStatus: CustomVocabularyStatus?
        /// The date and time that the custom vocabulary was last updated.
        public let lastUpdatedDateTime: Date?
        /// The locale that contains the custom vocabulary to describe.
        public let localeId: String?

        public init(botId: String? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, customVocabularyStatus: CustomVocabularyStatus? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.customVocabularyStatus = customVocabularyStatus
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case creationDateTime
            case customVocabularyStatus
            case lastUpdatedDateTime
            case localeId
        }
    }

    public struct DescribeExportRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "exportId", location: .uri("exportId"))
        ]

        /// The unique identifier of the export to describe.
        public let exportId: String

        public init(exportId: String) {
            self.exportId = exportId
        }

        public func validate(name: String) throws {
            try self.validate(self.exportId, name: "exportId", parent: name, max: 10)
            try self.validate(self.exportId, name: "exportId", parent: name, min: 10)
            try self.validate(self.exportId, name: "exportId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeExportResponse: AWSDecodableShape {
        /// The date and time that the export was created.
        public let creationDateTime: Date?
        /// A pre-signed S3 URL that points to the bot or bot locale archive. The URL is only available for 5 minutes after calling the DescribeExport operation.
        public let downloadUrl: String?
        /// The unique identifier of the described export.
        public let exportId: String?
        /// The status of the export. When the status is Complete the export archive file is available for download.
        public let exportStatus: ExportStatus?
        /// If the exportStatus is failed, contains one or more reasons why the export could not be completed.
        public let failureReasons: [String]?
        /// The file format used in the files that describe the resource.
        public let fileFormat: ImportExportFileFormat?
        /// The last date and time that the export was updated.
        public let lastUpdatedDateTime: Date?
        /// The bot, bot ID, and optional locale ID of the exported bot or bot locale.
        public let resourceSpecification: ExportResourceSpecification?

        public init(creationDateTime: Date? = nil, downloadUrl: String? = nil, exportId: String? = nil, exportStatus: ExportStatus? = nil, failureReasons: [String]? = nil, fileFormat: ImportExportFileFormat? = nil, lastUpdatedDateTime: Date? = nil, resourceSpecification: ExportResourceSpecification? = nil) {
            self.creationDateTime = creationDateTime
            self.downloadUrl = downloadUrl
            self.exportId = exportId
            self.exportStatus = exportStatus
            self.failureReasons = failureReasons
            self.fileFormat = fileFormat
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.resourceSpecification = resourceSpecification
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime
            case downloadUrl
            case exportId
            case exportStatus
            case failureReasons
            case fileFormat
            case lastUpdatedDateTime
            case resourceSpecification
        }
    }

    public struct DescribeImportRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "importId", location: .uri("importId"))
        ]

        /// The unique identifier of the import to describe.
        public let importId: String

        public init(importId: String) {
            self.importId = importId
        }

        public func validate(name: String) throws {
            try self.validate(self.importId, name: "importId", parent: name, max: 10)
            try self.validate(self.importId, name: "importId", parent: name, min: 10)
            try self.validate(self.importId, name: "importId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeImportResponse: AWSDecodableShape {
        /// The date and time that the import was created.
        public let creationDateTime: Date?
        /// If the importStatus field is Failed, this provides one or more reasons for the failure.
        public let failureReasons: [String]?
        /// The unique identifier that Amazon Lex assigned to the resource created by the import.
        public let importedResourceId: String?
        /// The name of the imported resource.
        public let importedResourceName: String?
        /// The unique identifier of the described import.
        public let importId: String?
        /// The status of the import process. When the status is Completed the resource is imported and ready for use.
        public let importStatus: ImportStatus?
        /// The date and time that the import was last updated.
        public let lastUpdatedDateTime: Date?
        /// The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.
        public let mergeStrategy: MergeStrategy?
        /// The specifications of the imported bot, bot locale, or custom vocabulary.
        public let resourceSpecification: ImportResourceSpecification?

        public init(creationDateTime: Date? = nil, failureReasons: [String]? = nil, importedResourceId: String? = nil, importedResourceName: String? = nil, importId: String? = nil, importStatus: ImportStatus? = nil, lastUpdatedDateTime: Date? = nil, mergeStrategy: MergeStrategy? = nil, resourceSpecification: ImportResourceSpecification? = nil) {
            self.creationDateTime = creationDateTime
            self.failureReasons = failureReasons
            self.importedResourceId = importedResourceId
            self.importedResourceName = importedResourceName
            self.importId = importId
            self.importStatus = importStatus
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.mergeStrategy = mergeStrategy
            self.resourceSpecification = resourceSpecification
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime
            case failureReasons
            case importedResourceId
            case importedResourceName
            case importId
            case importStatus
            case lastUpdatedDateTime
            case mergeStrategy
            case resourceSpecification
        }
    }

    public struct DescribeIntentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "intentId", location: .uri("intentId")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the bot associated with the intent.
        public let botId: String
        /// The version of the bot associated with the intent.
        public let botVersion: String
        /// The identifier of the intent to describe.
        public let intentId: String
        /// The identifier of the language and locale of the intent to describe. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String

        public init(botId: String, botVersion: String, intentId: String, localeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.intentId = intentId
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.validate(self.intentId, name: "intentId", parent: name, max: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, min: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeIntentResponse: AWSDecodableShape {
        /// The identifier of the bot associated with the intent.
        public let botId: String?
        /// The version of the bot associated with the intent.
        public let botVersion: String?
        /// A timestamp of the date and time that the intent was created.
        public let creationDateTime: Date?
        /// The description of the intent.
        public let description: String?
        /// The Lambda function called during each turn of a conversation with the intent.
        public let dialogCodeHook: DialogCodeHookSettings?
        /// The Lambda function called when the intent is complete and ready for fulfillment.
        public let fulfillmentCodeHook: FulfillmentCodeHookSettings?
        public let initialResponseSetting: InitialResponseSetting?
        /// A list of contexts that must be active for the intent to be considered for sending to the user.
        public let inputContexts: [InputContext]?
        /// The response that Amazon Lex sends to when the intent is closed.
        public let intentClosingSetting: IntentClosingSetting?
        /// Prompts that Amazon Lex sends to the user to confirm completion of an intent.
        public let intentConfirmationSetting: IntentConfirmationSetting?
        /// The unique identifier assigned to the intent when it was created.
        public let intentId: String?
        /// The name specified for the intent.
        public let intentName: String?
        /// Configuration information required to use the AMAZON.KendraSearchIntent intent.
        public let kendraConfiguration: KendraConfiguration?
        /// A timestamp of the date and time that the intent was last updated.
        public let lastUpdatedDateTime: Date?
        /// The language and locale specified for the intent.
        public let localeId: String?
        /// A list of contexts that are activated when the intent is fulfilled.
        public let outputContexts: [OutputContext]?
        /// The identifier of the built-in intent that this intent is derived from, if any.
        public let parentIntentSignature: String?
        /// User utterances that trigger this intent.
        public let sampleUtterances: [SampleUtterance]?
        /// The list that determines the priority that slots should be elicited from the user.
        public let slotPriorities: [SlotPriority]?

        public init(botId: String? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil, dialogCodeHook: DialogCodeHookSettings? = nil, fulfillmentCodeHook: FulfillmentCodeHookSettings? = nil, initialResponseSetting: InitialResponseSetting? = nil, inputContexts: [InputContext]? = nil, intentClosingSetting: IntentClosingSetting? = nil, intentConfirmationSetting: IntentConfirmationSetting? = nil, intentId: String? = nil, intentName: String? = nil, kendraConfiguration: KendraConfiguration? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, outputContexts: [OutputContext]? = nil, parentIntentSignature: String? = nil, sampleUtterances: [SampleUtterance]? = nil, slotPriorities: [SlotPriority]? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
            self.dialogCodeHook = dialogCodeHook
            self.fulfillmentCodeHook = fulfillmentCodeHook
            self.initialResponseSetting = initialResponseSetting
            self.inputContexts = inputContexts
            self.intentClosingSetting = intentClosingSetting
            self.intentConfirmationSetting = intentConfirmationSetting
            self.intentId = intentId
            self.intentName = intentName
            self.kendraConfiguration = kendraConfiguration
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.outputContexts = outputContexts
            self.parentIntentSignature = parentIntentSignature
            self.sampleUtterances = sampleUtterances
            self.slotPriorities = slotPriorities
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case creationDateTime
            case description
            case dialogCodeHook
            case fulfillmentCodeHook
            case initialResponseSetting
            case inputContexts
            case intentClosingSetting
            case intentConfirmationSetting
            case intentId
            case intentName
            case kendraConfiguration
            case lastUpdatedDateTime
            case localeId
            case outputContexts
            case parentIntentSignature
            case sampleUtterances
            case slotPriorities
        }
    }

    public struct DescribeResourcePolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeResourcePolicyResponse: AWSDecodableShape {
        /// The JSON structure that contains the resource policy. For more information about the contents of a JSON policy document, see  IAM JSON policy reference .
        public let policy: String?
        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
        public let resourceArn: String?
        /// The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
        public let revisionId: String?

        public init(policy: String? = nil, resourceArn: String? = nil, revisionId: String? = nil) {
            self.policy = policy
            self.resourceArn = resourceArn
            self.revisionId = revisionId
        }

        private enum CodingKeys: String, CodingKey {
            case policy
            case resourceArn
            case revisionId
        }
    }

    public struct DescribeSlotRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "intentId", location: .uri("intentId")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId")),
            AWSMemberEncoding(label: "slotId", location: .uri("slotId"))
        ]

        /// The identifier of the bot associated with the slot.
        public let botId: String
        /// The version of the bot associated with the slot.
        public let botVersion: String
        /// The identifier of the intent that contains the slot.
        public let intentId: String
        /// The identifier of the language and locale of the slot to describe. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// The unique identifier for the slot.
        public let slotId: String

        public init(botId: String, botVersion: String, intentId: String, localeId: String, slotId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.intentId = intentId
            self.localeId = localeId
            self.slotId = slotId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.validate(self.intentId, name: "intentId", parent: name, max: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, min: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.slotId, name: "slotId", parent: name, max: 10)
            try self.validate(self.slotId, name: "slotId", parent: name, min: 10)
            try self.validate(self.slotId, name: "slotId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeSlotResponse: AWSDecodableShape {
        /// The identifier of the bot associated with the slot.
        public let botId: String?
        /// The version of the bot associated with the slot.
        public let botVersion: String?
        /// A timestamp of the date and time that the slot was created.
        public let creationDateTime: Date?
        /// The description specified for the slot.
        public let description: String?
        /// The identifier of the intent associated with the slot.
        public let intentId: String?
        /// A timestamp of the date and time that the slot was last updated.
        public let lastUpdatedDateTime: Date?
        /// The language and locale specified for the slot.
        public let localeId: String?
        /// Indicates whether the slot accepts multiple values in a single utterance. If the multipleValuesSetting is not set, the default value is false.
        public let multipleValuesSetting: MultipleValuesSetting?
        /// Whether slot values are shown in Amazon CloudWatch logs. If the value is None, the actual value of the slot is shown in logs.
        public let obfuscationSetting: ObfuscationSetting?
        /// The unique identifier generated for the slot.
        public let slotId: String?
        /// The name specified for the slot.
        public let slotName: String?
        /// The identifier of the slot type that determines the values entered into the slot.
        public let slotTypeId: String?
        /// Specifications for the constituent sub slots and the   expression for the composite slot.
        public let subSlotSetting: SubSlotSetting?
        /// Prompts that Amazon Lex uses to elicit a value for the slot.
        public let valueElicitationSetting: SlotValueElicitationSetting?

        public init(botId: String? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil, intentId: String? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, multipleValuesSetting: MultipleValuesSetting? = nil, obfuscationSetting: ObfuscationSetting? = nil, slotId: String? = nil, slotName: String? = nil, slotTypeId: String? = nil, subSlotSetting: SubSlotSetting? = nil, valueElicitationSetting: SlotValueElicitationSetting? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
            self.intentId = intentId
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.multipleValuesSetting = multipleValuesSetting
            self.obfuscationSetting = obfuscationSetting
            self.slotId = slotId
            self.slotName = slotName
            self.slotTypeId = slotTypeId
            self.subSlotSetting = subSlotSetting
            self.valueElicitationSetting = valueElicitationSetting
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case creationDateTime
            case description
            case intentId
            case lastUpdatedDateTime
            case localeId
            case multipleValuesSetting
            case obfuscationSetting
            case slotId
            case slotName
            case slotTypeId
            case subSlotSetting
            case valueElicitationSetting
        }
    }

    public struct DescribeSlotTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId")),
            AWSMemberEncoding(label: "slotTypeId", location: .uri("slotTypeId"))
        ]

        /// The identifier of the bot associated with the slot type.
        public let botId: String
        /// The version of the bot associated with the slot type.
        public let botVersion: String
        /// The identifier of the language and locale of the slot type to describe. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// The identifier of the slot type.
        public let slotTypeId: String

        public init(botId: String, botVersion: String, localeId: String, slotTypeId: String) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
            self.slotTypeId = slotTypeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, max: 10)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, min: 10)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeSlotTypeResponse: AWSDecodableShape {
        /// The identifier of the bot associated with the slot type.
        public let botId: String?
        /// The version of the bot associated with the slot type.
        public let botVersion: String?
        /// Specifications for a composite slot type.
        public let compositeSlotTypeSetting: CompositeSlotTypeSetting?
        /// A timestamp of the date and time that the slot type was created.
        public let creationDateTime: Date?
        /// The description specified for the slot type.
        public let description: String?
        public let externalSourceSetting: ExternalSourceSetting?
        /// A timestamp of the date and time that the slot type was last updated.
        public let lastUpdatedDateTime: Date?
        /// The language and locale specified for the slot type.
        public let localeId: String?
        /// The built in slot type used as a parent to this slot type.
        public let parentSlotTypeSignature: String?
        /// The unique identifier for the slot type.
        public let slotTypeId: String?
        /// The name specified for the slot type.
        public let slotTypeName: String?
        /// The values that the slot type can take. Includes any synonyms for the slot type values.
        public let slotTypeValues: [SlotTypeValue]?
        /// The strategy that Amazon Lex uses to choose a value from a list of possible values.
        public let valueSelectionSetting: SlotValueSelectionSetting?

        public init(botId: String? = nil, botVersion: String? = nil, compositeSlotTypeSetting: CompositeSlotTypeSetting? = nil, creationDateTime: Date? = nil, description: String? = nil, externalSourceSetting: ExternalSourceSetting? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, parentSlotTypeSignature: String? = nil, slotTypeId: String? = nil, slotTypeName: String? = nil, slotTypeValues: [SlotTypeValue]? = nil, valueSelectionSetting: SlotValueSelectionSetting? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.compositeSlotTypeSetting = compositeSlotTypeSetting
            self.creationDateTime = creationDateTime
            self.description = description
            self.externalSourceSetting = externalSourceSetting
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.parentSlotTypeSignature = parentSlotTypeSignature
            self.slotTypeId = slotTypeId
            self.slotTypeName = slotTypeName
            self.slotTypeValues = slotTypeValues
            self.valueSelectionSetting = valueSelectionSetting
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case compositeSlotTypeSetting
            case creationDateTime
            case description
            case externalSourceSetting
            case lastUpdatedDateTime
            case localeId
            case parentSlotTypeSignature
            case slotTypeId
            case slotTypeName
            case slotTypeValues
            case valueSelectionSetting
        }
    }

    public struct DialogAction: AWSEncodableShape & AWSDecodableShape {
        /// If the dialog action is ElicitSlot, defines the slot to elicit from the user.
        public let slotToElicit: String?
        /// When true the next message for the intent is not used.
        public let suppressNextMessage: Bool?
        /// The action that the bot should execute.
        public let type: DialogActionType

        public init(slotToElicit: String? = nil, suppressNextMessage: Bool? = nil, type: DialogActionType) {
            self.slotToElicit = slotToElicit
            self.suppressNextMessage = suppressNextMessage
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.slotToElicit, name: "slotToElicit", parent: name, max: 100)
            try self.validate(self.slotToElicit, name: "slotToElicit", parent: name, min: 1)
            try self.validate(self.slotToElicit, name: "slotToElicit", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case slotToElicit
            case suppressNextMessage
            case type
        }
    }

    public struct DialogCodeHookInvocationSetting: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether a dialog code hook is used when the intent is activated.
        public let active: Bool
        /// Indicates whether a Lambda function should be invoked for the dialog.
        public let enableCodeHookInvocation: Bool
        /// A label that indicates the dialog step from which the dialog code hook is happening.
        public let invocationLabel: String?
        /// Contains the responses and actions that Amazon Lex takes after the Lambda function is complete.
        public let postCodeHookSpecification: PostDialogCodeHookInvocationSpecification

        public init(active: Bool, enableCodeHookInvocation: Bool, invocationLabel: String? = nil, postCodeHookSpecification: PostDialogCodeHookInvocationSpecification) {
            self.active = active
            self.enableCodeHookInvocation = enableCodeHookInvocation
            self.invocationLabel = invocationLabel
            self.postCodeHookSpecification = postCodeHookSpecification
        }

        public func validate(name: String) throws {
            try self.validate(self.invocationLabel, name: "invocationLabel", parent: name, max: 100)
            try self.validate(self.invocationLabel, name: "invocationLabel", parent: name, min: 1)
            try self.validate(self.invocationLabel, name: "invocationLabel", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.postCodeHookSpecification.validate(name: "\(name).postCodeHookSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case active
            case enableCodeHookInvocation
            case invocationLabel
            case postCodeHookSpecification
        }
    }

    public struct DialogCodeHookSettings: AWSEncodableShape & AWSDecodableShape {
        /// Enables the dialog code hook so that it processes user requests.
        public let enabled: Bool

        public init(enabled: Bool) {
            self.enabled = enabled
        }

        private enum CodingKeys: String, CodingKey {
            case enabled
        }
    }

    public struct DialogState: AWSEncodableShape & AWSDecodableShape {
        public let dialogAction: DialogAction?
        public let intent: IntentOverride?
        /// Map of key/value pairs representing session-specific context information. It contains application information passed between Amazon Lex and a client application.
        public let sessionAttributes: [String: String]?

        public init(dialogAction: DialogAction? = nil, intent: IntentOverride? = nil, sessionAttributes: [String: String]? = nil) {
            self.dialogAction = dialogAction
            self.intent = intent
            self.sessionAttributes = sessionAttributes
        }

        public func validate(name: String) throws {
            try self.dialogAction?.validate(name: "\(name).dialogAction")
            try self.intent?.validate(name: "\(name).intent")
            try self.sessionAttributes?.forEach {
                try validate($0.key, name: "sessionAttributes.key", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case dialogAction
            case intent
            case sessionAttributes
        }
    }

    public struct ElicitationCodeHookInvocationSetting: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether a Lambda function should be invoked for the dialog.
        public let enableCodeHookInvocation: Bool
        /// A label that indicates the dialog step from which the dialog code hook is happening.
        public let invocationLabel: String?

        public init(enableCodeHookInvocation: Bool, invocationLabel: String? = nil) {
            self.enableCodeHookInvocation = enableCodeHookInvocation
            self.invocationLabel = invocationLabel
        }

        public func validate(name: String) throws {
            try self.validate(self.invocationLabel, name: "invocationLabel", parent: name, max: 100)
            try self.validate(self.invocationLabel, name: "invocationLabel", parent: name, min: 1)
            try self.validate(self.invocationLabel, name: "invocationLabel", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case enableCodeHookInvocation
            case invocationLabel
        }
    }

    public struct EncryptionSetting: AWSEncodableShape & AWSDecodableShape {
        /// The password used to encrypt the associated transcript file.
        public let associatedTranscriptsPassword: String?
        /// The password used to encrypt the recommended bot recommendation file.
        public let botLocaleExportPassword: String?
        /// The KMS key ARN used to encrypt the metadata associated with the bot recommendation.
        public let kmsKeyArn: String?

        public init(associatedTranscriptsPassword: String? = nil, botLocaleExportPassword: String? = nil, kmsKeyArn: String? = nil) {
            self.associatedTranscriptsPassword = associatedTranscriptsPassword
            self.botLocaleExportPassword = botLocaleExportPassword
            self.kmsKeyArn = kmsKeyArn
        }

        public func validate(name: String) throws {
            try self.validate(self.associatedTranscriptsPassword, name: "associatedTranscriptsPassword", parent: name, max: 1024)
            try self.validate(self.botLocaleExportPassword, name: "botLocaleExportPassword", parent: name, max: 1024)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, max: 2048)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, min: 20)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, pattern: "^arn:[\\w\\-]+:kms:[\\w\\-]+:[\\d]{12}:(?:key\\/[\\w\\-]+|alias\\/[a-zA-Z0-9:\\/_\\-]{1,256})$")
        }

        private enum CodingKeys: String, CodingKey {
            case associatedTranscriptsPassword
            case botLocaleExportPassword
            case kmsKeyArn
        }
    }

    public struct ExportFilter: AWSEncodableShape {
        /// The name of the field to use for filtering.
        public let name: ExportFilterName
        /// The operator to use for the filter. Specify EQ when the ListExports operation should return only resource types that equal the specified value. Specify CO when the ListExports operation should return resource types that contain the specified value.
        public let `operator`: ExportFilterOperator
        /// The values to use to filter the response. The values must be Bot, BotLocale, or CustomVocabulary.
        public let values: [String]

        public init(name: ExportFilterName, operator: ExportFilterOperator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 100)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_()\\s-]+$")
            }
            try self.validate(self.values, name: "values", parent: name, max: 1)
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case `operator`
            case values
        }
    }

    public struct ExportResourceSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Parameters for exporting a bot.
        public let botExportSpecification: BotExportSpecification?
        /// Parameters for exporting a bot locale.
        public let botLocaleExportSpecification: BotLocaleExportSpecification?
        /// The parameters required to export a custom vocabulary.
        public let customVocabularyExportSpecification: CustomVocabularyExportSpecification?

        public init(botExportSpecification: BotExportSpecification? = nil, botLocaleExportSpecification: BotLocaleExportSpecification? = nil, customVocabularyExportSpecification: CustomVocabularyExportSpecification? = nil) {
            self.botExportSpecification = botExportSpecification
            self.botLocaleExportSpecification = botLocaleExportSpecification
            self.customVocabularyExportSpecification = customVocabularyExportSpecification
        }

        public func validate(name: String) throws {
            try self.botExportSpecification?.validate(name: "\(name).botExportSpecification")
            try self.botLocaleExportSpecification?.validate(name: "\(name).botLocaleExportSpecification")
            try self.customVocabularyExportSpecification?.validate(name: "\(name).customVocabularyExportSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case botExportSpecification
            case botLocaleExportSpecification
            case customVocabularyExportSpecification
        }
    }

    public struct ExportSortBy: AWSEncodableShape {
        /// The export field to use for sorting.
        public let attribute: ExportSortAttribute
        /// The order to sort the list.
        public let order: SortOrder

        public init(attribute: ExportSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct ExportSummary: AWSDecodableShape {
        /// The date and time that the export was created.
        public let creationDateTime: Date?
        /// The unique identifier that Amazon Lex assigned to the export.
        public let exportId: String?
        /// The status of the export. When the status is Completed the export is ready to download.
        public let exportStatus: ExportStatus?
        /// The file format used in the export files.
        public let fileFormat: ImportExportFileFormat?
        /// The date and time that the export was last updated.
        public let lastUpdatedDateTime: Date?
        /// Information about the bot or bot locale that was exported.
        public let resourceSpecification: ExportResourceSpecification?

        public init(creationDateTime: Date? = nil, exportId: String? = nil, exportStatus: ExportStatus? = nil, fileFormat: ImportExportFileFormat? = nil, lastUpdatedDateTime: Date? = nil, resourceSpecification: ExportResourceSpecification? = nil) {
            self.creationDateTime = creationDateTime
            self.exportId = exportId
            self.exportStatus = exportStatus
            self.fileFormat = fileFormat
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.resourceSpecification = resourceSpecification
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime
            case exportId
            case exportStatus
            case fileFormat
            case lastUpdatedDateTime
            case resourceSpecification
        }
    }

    public struct ExternalSourceSetting: AWSEncodableShape & AWSDecodableShape {
        /// Settings required for a slot type based on a grammar that you provide.
        public let grammarSlotTypeSetting: GrammarSlotTypeSetting?

        public init(grammarSlotTypeSetting: GrammarSlotTypeSetting? = nil) {
            self.grammarSlotTypeSetting = grammarSlotTypeSetting
        }

        public func validate(name: String) throws {
            try self.grammarSlotTypeSetting?.validate(name: "\(name).grammarSlotTypeSetting")
        }

        private enum CodingKeys: String, CodingKey {
            case grammarSlotTypeSetting
        }
    }

    public struct FailedCustomVocabularyItem: AWSDecodableShape {
        /// The unique error code for the failed custom vocabulary item  from the custom vocabulary list.
        public let errorCode: ErrorCode?
        /// The error message for the failed custom vocabulary item  from the custom vocabulary list.
        public let errorMessage: String?
        /// The unique item identifer for the failed custom vocabulary item  from the custom vocabulary list.
        public let itemId: String?

        public init(errorCode: ErrorCode? = nil, errorMessage: String? = nil, itemId: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.itemId = itemId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode
            case errorMessage
            case itemId
        }
    }

    public struct FulfillmentCodeHookSettings: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether the fulfillment code hook is used. When active is false, the code hook doesn't run.
        public let active: Bool?
        /// Indicates whether a Lambda function should be invoked to fulfill a specific intent.
        public let enabled: Bool
        /// Provides settings for update messages sent to the user for long-running Lambda fulfillment functions. Fulfillment updates can be used only with streaming conversations.
        public let fulfillmentUpdatesSpecification: FulfillmentUpdatesSpecification?
        /// Provides settings for messages sent to the user for after the Lambda fulfillment function completes. Post-fulfillment messages can be sent for both streaming and non-streaming conversations.
        public let postFulfillmentStatusSpecification: PostFulfillmentStatusSpecification?

        public init(active: Bool? = nil, enabled: Bool, fulfillmentUpdatesSpecification: FulfillmentUpdatesSpecification? = nil, postFulfillmentStatusSpecification: PostFulfillmentStatusSpecification? = nil) {
            self.active = active
            self.enabled = enabled
            self.fulfillmentUpdatesSpecification = fulfillmentUpdatesSpecification
            self.postFulfillmentStatusSpecification = postFulfillmentStatusSpecification
        }

        public func validate(name: String) throws {
            try self.fulfillmentUpdatesSpecification?.validate(name: "\(name).fulfillmentUpdatesSpecification")
            try self.postFulfillmentStatusSpecification?.validate(name: "\(name).postFulfillmentStatusSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case active
            case enabled
            case fulfillmentUpdatesSpecification
            case postFulfillmentStatusSpecification
        }
    }

    public struct FulfillmentStartResponseSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether the user can interrupt the start message while it is playing.
        public let allowInterrupt: Bool?
        /// The delay between when the Lambda fulfillment function starts running and the start message is played. If the Lambda function returns before the delay is over, the start message isn't played.
        public let delayInSeconds: Int
        /// One to 5 message groups that contain start messages. Amazon Lex chooses one of the messages to play to the user.
        public let messageGroups: [MessageGroup]

        public init(allowInterrupt: Bool? = nil, delayInSeconds: Int, messageGroups: [MessageGroup]) {
            self.allowInterrupt = allowInterrupt
            self.delayInSeconds = delayInSeconds
            self.messageGroups = messageGroups
        }

        public func validate(name: String) throws {
            try self.validate(self.delayInSeconds, name: "delayInSeconds", parent: name, max: 900)
            try self.validate(self.delayInSeconds, name: "delayInSeconds", parent: name, min: 1)
            try self.messageGroups.forEach {
                try $0.validate(name: "\(name).messageGroups[]")
            }
            try self.validate(self.messageGroups, name: "messageGroups", parent: name, max: 5)
            try self.validate(self.messageGroups, name: "messageGroups", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case allowInterrupt
            case delayInSeconds
            case messageGroups
        }
    }

    public struct FulfillmentUpdateResponseSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether the user can interrupt an update message while it is playing.
        public let allowInterrupt: Bool?
        /// The frequency that a message is sent to the user. When the period ends, Amazon Lex chooses a message from the message groups and plays it to the user. If the fulfillment Lambda returns before the first period ends, an update message is not played to the user.
        public let frequencyInSeconds: Int
        /// One to 5 message groups that contain update messages. Amazon Lex chooses one of the messages to play to the user.
        public let messageGroups: [MessageGroup]

        public init(allowInterrupt: Bool? = nil, frequencyInSeconds: Int, messageGroups: [MessageGroup]) {
            self.allowInterrupt = allowInterrupt
            self.frequencyInSeconds = frequencyInSeconds
            self.messageGroups = messageGroups
        }

        public func validate(name: String) throws {
            try self.validate(self.frequencyInSeconds, name: "frequencyInSeconds", parent: name, max: 900)
            try self.validate(self.frequencyInSeconds, name: "frequencyInSeconds", parent: name, min: 1)
            try self.messageGroups.forEach {
                try $0.validate(name: "\(name).messageGroups[]")
            }
            try self.validate(self.messageGroups, name: "messageGroups", parent: name, max: 5)
            try self.validate(self.messageGroups, name: "messageGroups", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case allowInterrupt
            case frequencyInSeconds
            case messageGroups
        }
    }

    public struct FulfillmentUpdatesSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether fulfillment updates are sent to the user. When this field is true, updates are sent. If the active field is set to true, the startResponse, updateResponse, and timeoutInSeconds fields are required.
        public let active: Bool
        /// Provides configuration information for the message sent to users when the fulfillment Lambda functions starts running.
        public let startResponse: FulfillmentStartResponseSpecification?
        /// The length of time that the fulfillment Lambda function should run before it times out.
        public let timeoutInSeconds: Int?
        /// Provides configuration information for messages sent periodically to the user while the fulfillment Lambda function is running.
        public let updateResponse: FulfillmentUpdateResponseSpecification?

        public init(active: Bool, startResponse: FulfillmentStartResponseSpecification? = nil, timeoutInSeconds: Int? = nil, updateResponse: FulfillmentUpdateResponseSpecification? = nil) {
            self.active = active
            self.startResponse = startResponse
            self.timeoutInSeconds = timeoutInSeconds
            self.updateResponse = updateResponse
        }

        public func validate(name: String) throws {
            try self.startResponse?.validate(name: "\(name).startResponse")
            try self.validate(self.timeoutInSeconds, name: "timeoutInSeconds", parent: name, max: 900)
            try self.validate(self.timeoutInSeconds, name: "timeoutInSeconds", parent: name, min: 1)
            try self.updateResponse?.validate(name: "\(name).updateResponse")
        }

        private enum CodingKeys: String, CodingKey {
            case active
            case startResponse
            case timeoutInSeconds
            case updateResponse
        }
    }

    public struct GrammarSlotTypeSetting: AWSEncodableShape & AWSDecodableShape {
        /// The source of the grammar used to create the slot type.
        public let source: GrammarSlotTypeSource?

        public init(source: GrammarSlotTypeSource? = nil) {
            self.source = source
        }

        public func validate(name: String) throws {
            try self.source?.validate(name: "\(name).source")
        }

        private enum CodingKeys: String, CodingKey {
            case source
        }
    }

    public struct GrammarSlotTypeSource: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon KMS key required to decrypt the contents of the grammar, if any.
        public let kmsKeyArn: String?
        /// The name of the S3 bucket that contains the grammar source.
        public let s3BucketName: String
        /// The path to the grammar in the S3 bucket.
        public let s3ObjectKey: String

        public init(kmsKeyArn: String? = nil, s3BucketName: String, s3ObjectKey: String) {
            self.kmsKeyArn = kmsKeyArn
            self.s3BucketName = s3BucketName
            self.s3ObjectKey = s3ObjectKey
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, max: 2048)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, min: 20)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, pattern: "^arn:[\\w\\-]+:kms:[\\w\\-]+:[\\d]{12}:(?:key\\/[\\w\\-]+|alias\\/[a-zA-Z0-9:\\/_\\-]{1,256})$")
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, max: 63)
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, min: 3)
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
            try self.validate(self.s3ObjectKey, name: "s3ObjectKey", parent: name, max: 1024)
            try self.validate(self.s3ObjectKey, name: "s3ObjectKey", parent: name, min: 1)
            try self.validate(self.s3ObjectKey, name: "s3ObjectKey", parent: name, pattern: "^[\\.\\-\\!\\*\\_\\'\\(\\)a-zA-Z0-9][\\.\\-\\!\\*\\_\\'\\(\\)\\/a-zA-Z0-9]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyArn
            case s3BucketName
            case s3ObjectKey
        }
    }

    public struct ImageResponseCard: AWSEncodableShape & AWSDecodableShape {
        /// A list of buttons that should be displayed on the response card. The arrangement of the buttons is determined by the platform that displays the button.
        public let buttons: [Button]?
        /// The URL of an image to display on the response card. The image URL must be publicly available so that the platform displaying the response card has access to the image.
        public let imageUrl: String?
        /// The subtitle to display on the response card. The format of the subtitle is determined by the platform displaying the response card.
        public let subtitle: String?
        /// The title to display on the response card. The format of the title is determined by the platform displaying the response card.
        public let title: String

        public init(buttons: [Button]? = nil, imageUrl: String? = nil, subtitle: String? = nil, title: String) {
            self.buttons = buttons
            self.imageUrl = imageUrl
            self.subtitle = subtitle
            self.title = title
        }

        public func validate(name: String) throws {
            try self.buttons?.forEach {
                try $0.validate(name: "\(name).buttons[]")
            }
            try self.validate(self.buttons, name: "buttons", parent: name, max: 5)
            try self.validate(self.imageUrl, name: "imageUrl", parent: name, max: 250)
            try self.validate(self.imageUrl, name: "imageUrl", parent: name, min: 1)
            try self.validate(self.subtitle, name: "subtitle", parent: name, max: 250)
            try self.validate(self.subtitle, name: "subtitle", parent: name, min: 1)
            try self.validate(self.title, name: "title", parent: name, max: 250)
            try self.validate(self.title, name: "title", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case buttons
            case imageUrl
            case subtitle
            case title
        }
    }

    public struct ImportFilter: AWSEncodableShape {
        /// The name of the field to use for filtering.
        public let name: ImportFilterName
        /// The operator to use for the filter. Specify EQ when the ListImports operation should return only resource types that equal the specified value. Specify CO when the ListImports operation should return resource types that contain the specified value.
        public let `operator`: ImportFilterOperator
        /// The values to use to filter the response. The values must be Bot, BotLocale, or CustomVocabulary.
        public let values: [String]

        public init(name: ImportFilterName, operator: ImportFilterOperator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 100)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_()\\s-]+$")
            }
            try self.validate(self.values, name: "values", parent: name, max: 1)
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case `operator`
            case values
        }
    }

    public struct ImportResourceSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Parameters for importing a bot.
        public let botImportSpecification: BotImportSpecification?
        /// Parameters for importing a bot locale.
        public let botLocaleImportSpecification: BotLocaleImportSpecification?
        public let customVocabularyImportSpecification: CustomVocabularyImportSpecification?

        public init(botImportSpecification: BotImportSpecification? = nil, botLocaleImportSpecification: BotLocaleImportSpecification? = nil, customVocabularyImportSpecification: CustomVocabularyImportSpecification? = nil) {
            self.botImportSpecification = botImportSpecification
            self.botLocaleImportSpecification = botLocaleImportSpecification
            self.customVocabularyImportSpecification = customVocabularyImportSpecification
        }

        public func validate(name: String) throws {
            try self.botImportSpecification?.validate(name: "\(name).botImportSpecification")
            try self.botLocaleImportSpecification?.validate(name: "\(name).botLocaleImportSpecification")
            try self.customVocabularyImportSpecification?.validate(name: "\(name).customVocabularyImportSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case botImportSpecification
            case botLocaleImportSpecification
            case customVocabularyImportSpecification
        }
    }

    public struct ImportSortBy: AWSEncodableShape {
        /// The export field to use for sorting.
        public let attribute: ImportSortAttribute
        /// The order to sort the list.
        public let order: SortOrder

        public init(attribute: ImportSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct ImportSummary: AWSDecodableShape {
        /// The date and time that the import was created.
        public let creationDateTime: Date?
        /// The unique identifier that Amazon Lex assigned to the imported resource.
        public let importedResourceId: String?
        /// The name that you gave the imported resource.
        public let importedResourceName: String?
        /// The type of resource that was imported.
        public let importedResourceType: ImportResourceType?
        /// The unique identifier that Amazon Lex assigned to the import.
        public let importId: String?
        /// The status of the resource. When the status is Completed the resource is ready to build.
        public let importStatus: ImportStatus?
        /// The date and time that the import was last updated.
        public let lastUpdatedDateTime: Date?
        /// The strategy used to merge existing bot or bot locale definitions with the imported definition.
        public let mergeStrategy: MergeStrategy?

        public init(creationDateTime: Date? = nil, importedResourceId: String? = nil, importedResourceName: String? = nil, importedResourceType: ImportResourceType? = nil, importId: String? = nil, importStatus: ImportStatus? = nil, lastUpdatedDateTime: Date? = nil, mergeStrategy: MergeStrategy? = nil) {
            self.creationDateTime = creationDateTime
            self.importedResourceId = importedResourceId
            self.importedResourceName = importedResourceName
            self.importedResourceType = importedResourceType
            self.importId = importId
            self.importStatus = importStatus
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.mergeStrategy = mergeStrategy
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime
            case importedResourceId
            case importedResourceName
            case importedResourceType
            case importId
            case importStatus
            case lastUpdatedDateTime
            case mergeStrategy
        }
    }

    public struct InitialResponseSetting: AWSEncodableShape & AWSDecodableShape {
        public let codeHook: DialogCodeHookInvocationSetting?
        public let conditional: ConditionalSpecification?
        public let initialResponse: ResponseSpecification?
        /// The next step in the conversation.
        public let nextStep: DialogState?

        public init(codeHook: DialogCodeHookInvocationSetting? = nil, conditional: ConditionalSpecification? = nil, initialResponse: ResponseSpecification? = nil, nextStep: DialogState? = nil) {
            self.codeHook = codeHook
            self.conditional = conditional
            self.initialResponse = initialResponse
            self.nextStep = nextStep
        }

        public func validate(name: String) throws {
            try self.codeHook?.validate(name: "\(name).codeHook")
            try self.conditional?.validate(name: "\(name).conditional")
            try self.initialResponse?.validate(name: "\(name).initialResponse")
            try self.nextStep?.validate(name: "\(name).nextStep")
        }

        private enum CodingKeys: String, CodingKey {
            case codeHook
            case conditional
            case initialResponse
            case nextStep
        }
    }

    public struct InputContext: AWSEncodableShape & AWSDecodableShape {
        /// The name of the context.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case name
        }
    }

    public struct IntentClosingSetting: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether an intent's closing response is used. When this field is false, the closing response isn't sent to the user. If the active field isn't specified, the default is true.
        public let active: Bool?
        /// The response that Amazon Lex sends to the user when the intent is complete.
        public let closingResponse: ResponseSpecification?
        /// A list of conditional branches associated with the intent's closing response. These branches are executed when the nextStep attribute is set to EvalutateConditional.
        public let conditional: ConditionalSpecification?
        /// Specifies the next step that the bot executes after playing the intent's closing response.
        public let nextStep: DialogState?

        public init(active: Bool? = nil, closingResponse: ResponseSpecification? = nil, conditional: ConditionalSpecification? = nil, nextStep: DialogState? = nil) {
            self.active = active
            self.closingResponse = closingResponse
            self.conditional = conditional
            self.nextStep = nextStep
        }

        public func validate(name: String) throws {
            try self.closingResponse?.validate(name: "\(name).closingResponse")
            try self.conditional?.validate(name: "\(name).conditional")
            try self.nextStep?.validate(name: "\(name).nextStep")
        }

        private enum CodingKeys: String, CodingKey {
            case active
            case closingResponse
            case conditional
            case nextStep
        }
    }

    public struct IntentConfirmationSetting: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether the intent's confirmation is sent to the user. When this field is false, confirmation and declination responses aren't sent. If the active field isn't specified, the default is true.
        public let active: Bool?
        /// The DialogCodeHookInvocationSetting object associated with intent's confirmation step. The dialog code hook is triggered based on these invocation settings when the confirmation next step or declination next step or failure next step is InvokeDialogCodeHook.
        public let codeHook: DialogCodeHookInvocationSetting?
        /// A list of conditional branches to evaluate after the intent is closed.
        public let confirmationConditional: ConditionalSpecification?
        /// Specifies the next step that the bot executes when the customer confirms the intent.
        public let confirmationNextStep: DialogState?
        public let confirmationResponse: ResponseSpecification?
        /// A list of conditional branches to evaluate after the intent is declined.
        public let declinationConditional: ConditionalSpecification?
        /// Specifies the next step that the bot executes when the customer declines the intent.
        public let declinationNextStep: DialogState?
        /// When the user answers "no" to the question defined in promptSpecification, Amazon Lex responds with this response to acknowledge that the intent was canceled.
        public let declinationResponse: ResponseSpecification?
        /// The DialogCodeHookInvocationSetting used when the code hook is invoked during confirmation prompt retries.
        public let elicitationCodeHook: ElicitationCodeHookInvocationSetting?
        public let failureConditional: ConditionalSpecification?
        /// The next step to take in the conversation if the confirmation step fails.
        public let failureNextStep: DialogState?
        public let failureResponse: ResponseSpecification?
        /// Prompts the user to confirm the intent. This question should have a yes or no answer. Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
        public let promptSpecification: PromptSpecification

        public init(active: Bool? = nil, codeHook: DialogCodeHookInvocationSetting? = nil, confirmationConditional: ConditionalSpecification? = nil, confirmationNextStep: DialogState? = nil, confirmationResponse: ResponseSpecification? = nil, declinationConditional: ConditionalSpecification? = nil, declinationNextStep: DialogState? = nil, declinationResponse: ResponseSpecification? = nil, elicitationCodeHook: ElicitationCodeHookInvocationSetting? = nil, failureConditional: ConditionalSpecification? = nil, failureNextStep: DialogState? = nil, failureResponse: ResponseSpecification? = nil, promptSpecification: PromptSpecification) {
            self.active = active
            self.codeHook = codeHook
            self.confirmationConditional = confirmationConditional
            self.confirmationNextStep = confirmationNextStep
            self.confirmationResponse = confirmationResponse
            self.declinationConditional = declinationConditional
            self.declinationNextStep = declinationNextStep
            self.declinationResponse = declinationResponse
            self.elicitationCodeHook = elicitationCodeHook
            self.failureConditional = failureConditional
            self.failureNextStep = failureNextStep
            self.failureResponse = failureResponse
            self.promptSpecification = promptSpecification
        }

        public func validate(name: String) throws {
            try self.codeHook?.validate(name: "\(name).codeHook")
            try self.confirmationConditional?.validate(name: "\(name).confirmationConditional")
            try self.confirmationNextStep?.validate(name: "\(name).confirmationNextStep")
            try self.confirmationResponse?.validate(name: "\(name).confirmationResponse")
            try self.declinationConditional?.validate(name: "\(name).declinationConditional")
            try self.declinationNextStep?.validate(name: "\(name).declinationNextStep")
            try self.declinationResponse?.validate(name: "\(name).declinationResponse")
            try self.elicitationCodeHook?.validate(name: "\(name).elicitationCodeHook")
            try self.failureConditional?.validate(name: "\(name).failureConditional")
            try self.failureNextStep?.validate(name: "\(name).failureNextStep")
            try self.failureResponse?.validate(name: "\(name).failureResponse")
            try self.promptSpecification.validate(name: "\(name).promptSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case active
            case codeHook
            case confirmationConditional
            case confirmationNextStep
            case confirmationResponse
            case declinationConditional
            case declinationNextStep
            case declinationResponse
            case elicitationCodeHook
            case failureConditional
            case failureNextStep
            case failureResponse
            case promptSpecification
        }
    }

    public struct IntentFilter: AWSEncodableShape {
        /// The name of the field to use for the filter.
        public let name: IntentFilterName
        /// The operator to use for the filter. Specify EQ when the ListIntents operation should return only aliases that equal the specified value. Specify CO when the ListIntents operation should return aliases that contain the specified value.
        public let `operator`: IntentFilterOperator
        /// The value to use for the filter.
        public let values: [String]

        public init(name: IntentFilterName, operator: IntentFilterOperator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 100)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_()\\s-]+$")
            }
            try self.validate(self.values, name: "values", parent: name, max: 1)
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case `operator`
            case values
        }
    }

    public struct IntentOverride: AWSEncodableShape & AWSDecodableShape {
        /// The name of the intent. Only required when you're switching intents.
        public let name: String?
        /// A map of all of the slot value overrides for the intent. The name of the slot maps to the value of the slot. Slots that are not included in the map aren't overridden.,
        public let slots: [String: SlotValueOverride]?

        public init(name: String? = nil, slots: [String: SlotValueOverride]? = nil) {
            self.name = name
            self.slots = slots
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.slots?.forEach {
                try validate($0.key, name: "slots.key", parent: name, max: 100)
                try validate($0.key, name: "slots.key", parent: name, min: 1)
                try validate($0.key, name: "slots.key", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
                try $0.value.validate(name: "\(name).slots[\"\($0.key)\"]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case slots
        }
    }

    public struct IntentSortBy: AWSEncodableShape {
        /// The attribute to use to sort the list of intents.
        public let attribute: IntentSortAttribute
        /// The order to sort the list. You can choose ascending or descending.
        public let order: SortOrder

        public init(attribute: IntentSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct IntentStatistics: AWSDecodableShape {
        /// The number of recommended intents associated with the bot recommendation.
        public let discoveredIntentCount: Int?

        public init(discoveredIntentCount: Int? = nil) {
            self.discoveredIntentCount = discoveredIntentCount
        }

        private enum CodingKeys: String, CodingKey {
            case discoveredIntentCount
        }
    }

    public struct IntentSummary: AWSDecodableShape {
        /// The description of the intent.
        public let description: String?
        /// The input contexts that must be active for this intent to be considered for recognition.
        public let inputContexts: [InputContext]?
        /// The unique identifier assigned to the intent. Use this ID to get detailed information about the intent with the DescribeIntent operation.
        public let intentId: String?
        /// The name of the intent.
        public let intentName: String?
        /// The timestamp of the date and time that the intent was last updated.
        public let lastUpdatedDateTime: Date?
        /// The output contexts that are activated when this intent is fulfilled.
        public let outputContexts: [OutputContext]?
        /// If this intent is derived from a built-in intent, the name of the parent intent.
        public let parentIntentSignature: String?

        public init(description: String? = nil, inputContexts: [InputContext]? = nil, intentId: String? = nil, intentName: String? = nil, lastUpdatedDateTime: Date? = nil, outputContexts: [OutputContext]? = nil, parentIntentSignature: String? = nil) {
            self.description = description
            self.inputContexts = inputContexts
            self.intentId = intentId
            self.intentName = intentName
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.outputContexts = outputContexts
            self.parentIntentSignature = parentIntentSignature
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case inputContexts
            case intentId
            case intentName
            case lastUpdatedDateTime
            case outputContexts
            case parentIntentSignature
        }
    }

    public struct KendraConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot.
        public let kendraIndex: String
        /// A query filter that Amazon Lex sends to Amazon Kendra to filter the response from a query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries.
        public let queryFilterString: String?
        /// Determines whether the AMAZON.KendraSearchIntent intent uses a custom query string to query the Amazon Kendra index.
        public let queryFilterStringEnabled: Bool?

        public init(kendraIndex: String, queryFilterString: String? = nil, queryFilterStringEnabled: Bool? = nil) {
            self.kendraIndex = kendraIndex
            self.queryFilterString = queryFilterString
            self.queryFilterStringEnabled = queryFilterStringEnabled
        }

        public func validate(name: String) throws {
            try self.validate(self.kendraIndex, name: "kendraIndex", parent: name, max: 2048)
            try self.validate(self.kendraIndex, name: "kendraIndex", parent: name, min: 32)
            try self.validate(self.kendraIndex, name: "kendraIndex", parent: name, pattern: "^arn:aws:kendra:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:index\\/[a-zA-Z0-9][a-zA-Z0-9_-]*$")
            try self.validate(self.queryFilterString, name: "queryFilterString", parent: name, max: 5000)
            try self.validate(self.queryFilterString, name: "queryFilterString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case kendraIndex
            case queryFilterString
            case queryFilterStringEnabled
        }
    }

    public struct LambdaCodeHook: AWSEncodableShape & AWSDecodableShape {
        /// The version of the request-response that you want Amazon Lex to use to invoke your Lambda function.
        public let codeHookInterfaceVersion: String
        /// The Amazon Resource Name (ARN) of the Lambda function.
        public let lambdaARN: String

        public init(codeHookInterfaceVersion: String, lambdaARN: String) {
            self.codeHookInterfaceVersion = codeHookInterfaceVersion
            self.lambdaARN = lambdaARN
        }

        public func validate(name: String) throws {
            try self.validate(self.codeHookInterfaceVersion, name: "codeHookInterfaceVersion", parent: name, max: 5)
            try self.validate(self.codeHookInterfaceVersion, name: "codeHookInterfaceVersion", parent: name, min: 1)
            try self.validate(self.lambdaARN, name: "lambdaARN", parent: name, max: 2048)
            try self.validate(self.lambdaARN, name: "lambdaARN", parent: name, min: 20)
            try self.validate(self.lambdaARN, name: "lambdaARN", parent: name, pattern: "^arn:aws:lambda:[a-z]+-[a-z]+-[0-9]:[0-9]{12}:function:[a-zA-Z0-9-_]+(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?(:[a-zA-Z0-9-_]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case codeHookInterfaceVersion
            case lambdaARN
        }
    }

    public struct LexTranscriptFilter: AWSEncodableShape & AWSDecodableShape {
        /// The object that contains a date range filter that will be applied to the transcript. Specify this object if you want Amazon Lex to only read the files that are within the date range.
        public let dateRangeFilter: DateRangeFilter?

        public init(dateRangeFilter: DateRangeFilter? = nil) {
            self.dateRangeFilter = dateRangeFilter
        }

        private enum CodingKeys: String, CodingKey {
            case dateRangeFilter
        }
    }

    public struct ListAggregatedUtterancesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId"))
        ]

        /// The time window for aggregating the utterance information. You can specify a time between one hour and two weeks.
        public let aggregationDuration: UtteranceAggregationDuration
        /// The identifier of the bot alias associated with this request. If you specify the bot alias, you can't specify the bot version.
        public let botAliasId: String?
        /// The unique identifier of the bot associated with this request.
        public let botId: String
        /// The identifier of the bot version associated with this request. If you specify the bot version, you can't specify the bot alias.
        public let botVersion: String?
        /// Provides the specification of a filter used to limit the utterances in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.
        public let filters: [AggregatedUtterancesFilter]?
        /// The identifier of the language and locale where the utterances were collected. For more information, see Supported languages.
        public let localeId: String
        /// The maximum number of utterances to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned. If you don't specify the maxResults parameter, 1,000 results are returned.
        public let maxResults: Int?
        /// If the response from the ListAggregatedUtterances operation contains more results that specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
        public let nextToken: String?
        /// Specifies sorting parameters for the list of utterances. You can sort by the hit count, the missed count, or the number of distinct sessions the utterance appeared in.
        public let sortBy: AggregatedUtterancesSortBy?

        public init(aggregationDuration: UtteranceAggregationDuration, botAliasId: String? = nil, botId: String, botVersion: String? = nil, filters: [AggregatedUtterancesFilter]? = nil, localeId: String, maxResults: Int? = nil, nextToken: String? = nil, sortBy: AggregatedUtterancesSortBy? = nil) {
            self.aggregationDuration = aggregationDuration
            self.botAliasId = botAliasId
            self.botId = botId
            self.botVersion = botVersion
            self.filters = filters
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.aggregationDuration.validate(name: "\(name).aggregationDuration")
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, max: 10)
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, min: 10)
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, pattern: "^(\\bTSTALIASID\\b|[0-9a-zA-Z]+)$")
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationDuration
            case botAliasId
            case botVersion
            case filters
            case localeId
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListAggregatedUtterancesResponse: AWSDecodableShape {
        /// Summaries of the aggregated utterance data. Each response contains information about the number of times that the utterance was seen during the time period, whether it was detected or missed, and when it was seen during the time period.
        public let aggregatedUtterancesSummaries: [AggregatedUtterancesSummary]?
        /// The time period used to aggregate the utterance data.
        public let aggregationDuration: UtteranceAggregationDuration?
        /// The last date and time that the aggregated data was collected. The time period depends on the length of the aggregation window.    Hours - for 1 hour time window, every half hour; otherwise every hour.    Days - every 6 hours    Weeks - for a one week time window, every 12 hours; otherwise, every day
        public let aggregationLastRefreshedDateTime: Date?
        /// The date and time that the aggregation window ends. Only data collected between the start time and the end time are returned in the results.
        public let aggregationWindowEndTime: Date?
        /// The date and time that the aggregation window begins. Only data collected after this time is returned in the results.
        public let aggregationWindowStartTime: Date?
        /// The identifier of the bot alias that contains the utterances. If you specified the bot version, the bot alias ID isn't returned.
        public let botAliasId: String?
        /// The identifier of the bot that contains the utterances.
        public let botId: String?
        /// The identifier of the bot version that contains the utterances. If you specified the bot alias, the bot version isn't returned.
        public let botVersion: String?
        /// The identifier of the language and locale that the utterances are in.
        public let localeId: String?
        /// A token that indicates whether there are more results to return in a response to the ListAggregatedUtterances operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListAggregatedUtterances operation request to get the next page of results.
        public let nextToken: String?

        public init(aggregatedUtterancesSummaries: [AggregatedUtterancesSummary]? = nil, aggregationDuration: UtteranceAggregationDuration? = nil, aggregationLastRefreshedDateTime: Date? = nil, aggregationWindowEndTime: Date? = nil, aggregationWindowStartTime: Date? = nil, botAliasId: String? = nil, botId: String? = nil, botVersion: String? = nil, localeId: String? = nil, nextToken: String? = nil) {
            self.aggregatedUtterancesSummaries = aggregatedUtterancesSummaries
            self.aggregationDuration = aggregationDuration
            self.aggregationLastRefreshedDateTime = aggregationLastRefreshedDateTime
            self.aggregationWindowEndTime = aggregationWindowEndTime
            self.aggregationWindowStartTime = aggregationWindowStartTime
            self.botAliasId = botAliasId
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case aggregatedUtterancesSummaries
            case aggregationDuration
            case aggregationLastRefreshedDateTime
            case aggregationWindowEndTime
            case aggregationWindowStartTime
            case botAliasId
            case botId
            case botVersion
            case localeId
            case nextToken
        }
    }

    public struct ListBotAliasesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId"))
        ]

        /// The identifier of the bot to list aliases for.
        public let botId: String
        /// The maximum number of aliases to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListBotAliases operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
        public let nextToken: String?

        public init(botId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListBotAliasesResponse: AWSDecodableShape {
        /// Summary information for the bot aliases that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more aliases available, the nextToken field contains a token to get the next page of results.
        public let botAliasSummaries: [BotAliasSummary]?
        /// The identifier of the bot associated with the aliases.
        public let botId: String?
        /// A token that indicates whether there are more results to return in a response to the ListBotAliases operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBotAliases operation request to get the next page of results.
        public let nextToken: String?

        public init(botAliasSummaries: [BotAliasSummary]? = nil, botId: String? = nil, nextToken: String? = nil) {
            self.botAliasSummaries = botAliasSummaries
            self.botId = botId
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botAliasSummaries
            case botId
            case nextToken
        }
    }

    public struct ListBotLocalesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion"))
        ]

        /// The identifier of the bot to list locales for.
        public let botId: String
        /// The version of the bot to list locales for.
        public let botVersion: String
        /// Provides the specification for a filter used to limit the response to only those locales that match the filter specification. You can only specify one filter and one value to filter on.
        public let filters: [BotLocaleFilter]?
        /// The maximum number of aliases to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListBotLocales operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token as the nextToken parameter to return the next page of results.
        public let nextToken: String?
        /// Specifies sorting parameters for the list of locales. You can sort by locale name in ascending or descending order.
        public let sortBy: BotLocaleSortBy?

        public init(botId: String, botVersion: String, filters: [BotLocaleFilter]? = nil, maxResults: Int? = nil, nextToken: String? = nil, sortBy: BotLocaleSortBy? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListBotLocalesResponse: AWSDecodableShape {
        /// The identifier of the bot to list locales for.
        public let botId: String?
        /// Summary information for the locales that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more locales available, the nextToken field contains a token to get the next page of results.
        public let botLocaleSummaries: [BotLocaleSummary]?
        /// The version of the bot.
        public let botVersion: String?
        /// A token that indicates whether there are more results to return in a response to the ListBotLocales operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBotLocales operation request to get the next page of results.
        public let nextToken: String?

        public init(botId: String? = nil, botLocaleSummaries: [BotLocaleSummary]? = nil, botVersion: String? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.botLocaleSummaries = botLocaleSummaries
            self.botVersion = botVersion
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botLocaleSummaries
            case botVersion
            case nextToken
        }
    }

    public struct ListBotRecommendationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot that contains the bot recommendation list.
        public let botId: String
        /// The version of the bot that contains the bot recommendation list.
        public let botVersion: String
        /// The identifier of the language and locale of the bot recommendation list.
        public let localeId: String
        /// The maximum number of bot recommendations to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListBotRecommendation operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
        public let nextToken: String?

        public init(botId: String, botVersion: String, localeId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListBotRecommendationsResponse: AWSDecodableShape {
        /// The unique identifier of the bot that contains the bot recommendation list.
        public let botId: String?
        /// Summary information for the bot recommendations that meet the filter specified in this request. The length of the list is specified in the maxResults parameter of the request. If there are more bot recommendations available, the nextToken field contains a token to get the next page of results.
        public let botRecommendationSummaries: [BotRecommendationSummary]?
        /// The version of the bot that contains the bot recommendation list.
        public let botVersion: String?
        /// The identifier of the language and locale of the bot recommendation list.
        public let localeId: String?
        /// A token that indicates whether there are more results to return in a response to the ListBotRecommendations operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBotRecommendations operation request to get the next page of results.
        public let nextToken: String?

        public init(botId: String? = nil, botRecommendationSummaries: [BotRecommendationSummary]? = nil, botVersion: String? = nil, localeId: String? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.botRecommendationSummaries = botRecommendationSummaries
            self.botVersion = botVersion
            self.localeId = localeId
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botRecommendationSummaries
            case botVersion
            case localeId
            case nextToken
        }
    }

    public struct ListBotVersionsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId"))
        ]

        /// The identifier of the bot to list versions for.
        public let botId: String
        /// The maximum number of versions to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response to the ListBotVersion operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
        public let nextToken: String?
        /// Specifies sorting parameters for the list of versions. You can specify that the list be sorted by version name in either ascending or descending order.
        public let sortBy: BotVersionSortBy?

        public init(botId: String, maxResults: Int? = nil, nextToken: String? = nil, sortBy: BotVersionSortBy? = nil) {
            self.botId = botId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListBotVersionsResponse: AWSDecodableShape {
        /// The identifier of the bot to list versions for.
        public let botId: String?
        /// Summary information for the bot versions that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more versions available, the nextToken field contains a token to get the next page of results.
        public let botVersionSummaries: [BotVersionSummary]?
        /// A token that indicates whether there are more results to return in a response to the ListBotVersions operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBotAliases operation request to get the next page of results.
        public let nextToken: String?

        public init(botId: String? = nil, botVersionSummaries: [BotVersionSummary]? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.botVersionSummaries = botVersionSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersionSummaries
            case nextToken
        }
    }

    public struct ListBotsRequest: AWSEncodableShape {
        /// Provides the specification of a filter used to limit the bots in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.
        public let filters: [BotFilter]?
        /// The maximum number of bots to return in each page of results. If there are fewer results than the maximum page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListBots operation contains more results than specified in the maxResults parameter, a token is returned in the response.  Use the returned token in the nextToken parameter of a ListBots request to return the next page of results. For a complete set of results, call the ListBots operation until the nextToken returned in the response is null.
        public let nextToken: String?
        /// Specifies sorting parameters for the list of bots. You can specify that the list be sorted by bot name in ascending or descending order.
        public let sortBy: BotSortBy?

        public init(filters: [BotFilter]? = nil, maxResults: Int? = nil, nextToken: String? = nil, sortBy: BotSortBy? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListBotsResponse: AWSDecodableShape {
        /// Summary information for the bots that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more bots available, the nextToken field contains a token to the next page of results.
        public let botSummaries: [BotSummary]?
        /// A token that indicates whether there are more results to return in a response to the ListBots operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBots operation request to get the next page of results.
        public let nextToken: String?

        public init(botSummaries: [BotSummary]? = nil, nextToken: String? = nil) {
            self.botSummaries = botSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botSummaries
            case nextToken
        }
    }

    public struct ListBuiltInIntentsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// The maximum number of built-in intents to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListBuiltInIntents operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
        public let nextToken: String?
        /// Specifies sorting parameters for the list of built-in intents. You can specify that the list be sorted by the built-in intent signature in either ascending or descending order.
        public let sortBy: BuiltInIntentSortBy?

        public init(localeId: String, maxResults: Int? = nil, nextToken: String? = nil, sortBy: BuiltInIntentSortBy? = nil) {
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 20)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListBuiltInIntentsResponse: AWSDecodableShape {
        /// Summary information for the built-in intents that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more intents available, the nextToken field contains a token to get the next page of results.
        public let builtInIntentSummaries: [BuiltInIntentSummary]?
        /// The language and locale of the intents in the list.
        public let localeId: String?
        /// A token that indicates whether there are more results to return in a response to the ListBuiltInIntents operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListBotAliases operation request to get the next page of results.
        public let nextToken: String?

        public init(builtInIntentSummaries: [BuiltInIntentSummary]? = nil, localeId: String? = nil, nextToken: String? = nil) {
            self.builtInIntentSummaries = builtInIntentSummaries
            self.localeId = localeId
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case builtInIntentSummaries
            case localeId
            case nextToken
        }
    }

    public struct ListBuiltInSlotTypesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the language and locale of the slot types to list. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// The maximum number of built-in slot types to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListBuiltInSlotTypes operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
        public let nextToken: String?
        /// Determines the sort order for the response from the ListBuiltInSlotTypes operation. You can choose to sort by the slot type signature in either ascending or descending order.
        public let sortBy: BuiltInSlotTypeSortBy?

        public init(localeId: String, maxResults: Int? = nil, nextToken: String? = nil, sortBy: BuiltInSlotTypeSortBy? = nil) {
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 20)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListBuiltInSlotTypesResponse: AWSDecodableShape {
        /// Summary information for the built-in slot types that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more slot types available, the nextToken field contains a token to get the next page of results.
        public let builtInSlotTypeSummaries: [BuiltInSlotTypeSummary]?
        /// The language and locale of the slot types in the list.
        public let localeId: String?
        /// A token that indicates whether there are more results to return in a response to the ListBuiltInSlotTypes operation. If the nextToken field is present, you send the contents as the nextToken parameter of a LIstBuiltInSlotTypes operation request to get the next page of results.
        public let nextToken: String?

        public init(builtInSlotTypeSummaries: [BuiltInSlotTypeSummary]? = nil, localeId: String? = nil, nextToken: String? = nil) {
            self.builtInSlotTypeSummaries = builtInSlotTypeSummaries
            self.localeId = localeId
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case builtInSlotTypeSummaries
            case localeId
            case nextToken
        }
    }

    public struct ListCustomVocabularyItemsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot to the list custom vocabulary  request.
        public let botId: String
        /// The bot version of the bot to the list custom vocabulary  request.
        public let botVersion: String
        /// The locale identifier of the bot to the list custom vocabulary  request.
        public let localeId: String
        /// The maximum results to the list custom vocabulary  request.
        public let maxResults: Int?
        /// The nextToken identifier to the list custom vocabulary  request.
        public let nextToken: String?

        public init(botId: String, botVersion: String, localeId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListCustomVocabularyItemsResponse: AWSDecodableShape {
        /// The unique identifier of the bot to the list custom vocabulary  response.
        public let botId: String?
        /// The bot version of the bot to the list custom vocabulary  response.
        public let botVersion: String?
        /// The custom vocabulary items from the list custom vocabulary  response.
        public let customVocabularyItems: [CustomVocabularyItem]?
        /// The locale identifier of the bot to the list custom vocabulary  response.
        public let localeId: String?
        /// The nextToken identifier to the list custom vocabulary  response.
        public let nextToken: String?

        public init(botId: String? = nil, botVersion: String? = nil, customVocabularyItems: [CustomVocabularyItem]? = nil, localeId: String? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.customVocabularyItems = customVocabularyItems
            self.localeId = localeId
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case customVocabularyItems
            case localeId
            case nextToken
        }
    }

    public struct ListExportsRequest: AWSEncodableShape {
        /// The unique identifier that Amazon Lex assigned to the bot.
        public let botId: String?
        /// The version of the bot to list exports for.
        public let botVersion: String?
        /// Provides the specification of a filter used to limit the exports in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.
        public let filters: [ExportFilter]?
        /// Specifies the resources that should be exported. If you don't specify a resource type in the filters parameter, both bot locales and custom vocabularies are exported.
        public let localeId: String?
        /// The maximum number of exports to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListExports operation contains more results that specified in the maxResults parameter, a token is returned in the response.  Use the returned token in the nextToken parameter of a ListExports request to return the next page of results. For a complete set of results, call the ListExports operation until the nextToken returned in the response is null.
        public let nextToken: String?
        /// Determines the field that the list of exports is sorted by. You can sort by the LastUpdatedDateTime field in ascending or descending order.
        public let sortBy: ExportSortBy?

        public init(botId: String? = nil, botVersion: String? = nil, filters: [ExportFilter]? = nil, localeId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, sortBy: ExportSortBy? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.filters = filters
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case filters
            case localeId
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListExportsResponse: AWSDecodableShape {
        /// The unique identifier assigned to the bot by Amazon Lex.
        public let botId: String?
        /// The version of the bot that was exported.
        public let botVersion: String?
        /// Summary information for the exports that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter. If there are more exports available, the nextToken field contains a token to get the next page of results.
        public let exportSummaries: [ExportSummary]?
        /// The locale specified in the request.
        public let localeId: String?
        /// A token that indicates whether there are more results to return in a response to the ListExports operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListExports operation request to get the next page of results.
        public let nextToken: String?

        public init(botId: String? = nil, botVersion: String? = nil, exportSummaries: [ExportSummary]? = nil, localeId: String? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.exportSummaries = exportSummaries
            self.localeId = localeId
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case exportSummaries
            case localeId
            case nextToken
        }
    }

    public struct ListImportsRequest: AWSEncodableShape {
        /// The unique identifier that Amazon Lex assigned to the bot.
        public let botId: String?
        /// The version of the bot to list imports for.
        public let botVersion: String?
        /// Provides the specification of a filter used to limit the bots in the response to only those that match the filter specification. You can only specify one filter and one string to filter on.
        public let filters: [ImportFilter]?
        /// Specifies the locale that should be present in the list. If you don't specify a resource type in the filters parameter, the list contains both bot locales and custom vocabularies.
        public let localeId: String?
        /// The maximum number of imports to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListImports operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use the returned token in the nextToken parameter of a ListImports request to return the next page of results. For a complete set of results, call the ListImports operation until the nextToken returned in the response is null.
        public let nextToken: String?
        /// Determines the field that the list of imports is sorted by. You can sort by the LastUpdatedDateTime field in ascending or descending order.
        public let sortBy: ImportSortBy?

        public init(botId: String? = nil, botVersion: String? = nil, filters: [ImportFilter]? = nil, localeId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, sortBy: ImportSortBy? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.filters = filters
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case filters
            case localeId
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListImportsResponse: AWSDecodableShape {
        /// The unique identifier assigned by Amazon Lex to the bot.
        public let botId: String?
        /// The version of the bot that was imported. It will always be DRAFT.
        public let botVersion: String?
        /// Summary information for the imports that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter. If there are more imports available, the nextToken field contains a token to get the next page of results.
        public let importSummaries: [ImportSummary]?
        /// The locale specified in the request.
        public let localeId: String?
        /// A token that indicates whether there are more results to return in a response to the ListImports operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListImports operation request to get the next page of results.
        public let nextToken: String?

        public init(botId: String? = nil, botVersion: String? = nil, importSummaries: [ImportSummary]? = nil, localeId: String? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.importSummaries = importSummaries
            self.localeId = localeId
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case importSummaries
            case localeId
            case nextToken
        }
    }

    public struct ListIntentsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot that contains the intent.
        public let botId: String
        /// The version of the bot that contains the intent.
        public let botVersion: String
        /// Provides the specification of a filter used to limit the intents in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.
        public let filters: [IntentFilter]?
        /// The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// The maximum number of intents to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListIntents operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use the returned token in the nextToken parameter of a ListIntents request to return the next page of results. For a complete set of results, call the ListIntents operation until the nextToken returned in the response is null.
        public let nextToken: String?
        /// Determines the sort order for the response from the ListIntents operation. You can choose to sort by the intent name or last updated date in either ascending or descending order.
        public let sortBy: IntentSortBy?

        public init(botId: String, botVersion: String, filters: [IntentFilter]? = nil, localeId: String, maxResults: Int? = nil, nextToken: String? = nil, sortBy: IntentSortBy? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.filters = filters
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListIntentsResponse: AWSDecodableShape {
        /// The identifier of the bot that contains the intent.
        public let botId: String?
        /// The version of the bot that contains the intent.
        public let botVersion: String?
        /// Summary information for the intents that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more intents available, the nextToken field contains a token to get the next page of results.
        public let intentSummaries: [IntentSummary]?
        /// The language and locale of the intents in the list.
        public let localeId: String?
        /// A token that indicates whether there are more results to return in a response to the ListIntents operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListIntents operation request to get the next page of results.
        public let nextToken: String?

        public init(botId: String? = nil, botVersion: String? = nil, intentSummaries: [IntentSummary]? = nil, localeId: String? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.intentSummaries = intentSummaries
            self.localeId = localeId
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case intentSummaries
            case localeId
            case nextToken
        }
    }

    public struct ListRecommendedIntentsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botRecommendationId", location: .uri("botRecommendationId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot associated with the recommended intents.
        public let botId: String
        /// The identifier of the bot recommendation that contains the recommended intents.
        public let botRecommendationId: String
        /// The version of the bot that contains the recommended intents.
        public let botVersion: String
        /// The identifier of the language and locale of the recommended intents.
        public let localeId: String
        /// The maximum number of bot recommendations to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListRecommendedIntents operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
        public let nextToken: String?

        public init(botId: String, botRecommendationId: String, botVersion: String, localeId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botVersion = botVersion
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, max: 10)
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, min: 10)
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
        }
    }

    public struct ListRecommendedIntentsResponse: AWSDecodableShape {
        /// The unique identifier of the bot associated with the recommended intent.
        public let botId: String?
        /// The identifier of the bot recommendation that contains the recommended intent.
        public let botRecommendationId: String?
        /// The version of the bot that contains the intent.
        public let botVersion: String?
        /// The identifier of the language and locale of the intents to list. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String?
        /// A token that indicates whether there are more results to return in a response to the ListRecommendedIntents operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListRecommendedIntents operation request to get the next page of results.
        public let nextToken: String?
        /// Summary information for the intents that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more intents available, the nextToken field contains a token to get the next page of results.
        public let summaryList: [RecommendedIntentSummary]?

        public init(botId: String? = nil, botRecommendationId: String? = nil, botVersion: String? = nil, localeId: String? = nil, nextToken: String? = nil, summaryList: [RecommendedIntentSummary]? = nil) {
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botVersion = botVersion
            self.localeId = localeId
            self.nextToken = nextToken
            self.summaryList = summaryList
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botRecommendationId
            case botVersion
            case localeId
            case nextToken
            case summaryList
        }
    }

    public struct ListSlotTypesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot that contains the slot types.
        public let botId: String
        /// The version of the bot that contains the slot type.
        public let botVersion: String
        /// Provides the specification of a filter used to limit the slot types in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.
        public let filters: [SlotTypeFilter]?
        /// The identifier of the language and locale of the slot types to list. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// The maximum number of slot types to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListSlotTypes operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
        public let nextToken: String?
        /// Determines the sort order for the response from the ListSlotTypes operation. You can choose to sort by the slot type name or last updated date in either ascending or descending order.
        public let sortBy: SlotTypeSortBy?

        public init(botId: String, botVersion: String, filters: [SlotTypeFilter]? = nil, localeId: String, maxResults: Int? = nil, nextToken: String? = nil, sortBy: SlotTypeSortBy? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.filters = filters
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListSlotTypesResponse: AWSDecodableShape {
        /// The identifier of the bot that contains the slot types.
        public let botId: String?
        /// The version of the bot that contains the slot types.
        public let botVersion: String?
        /// The language and local of the slot types in the list.
        public let localeId: String?
        /// A token that indicates whether there are more results to return in a response to the ListSlotTypes operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListSlotTypes operation request to get the next page of results.
        public let nextToken: String?
        /// Summary information for the slot types that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more slot types available, the nextToken field contains a token to get the next page of results.
        public let slotTypeSummaries: [SlotTypeSummary]?

        public init(botId: String? = nil, botVersion: String? = nil, localeId: String? = nil, nextToken: String? = nil, slotTypeSummaries: [SlotTypeSummary]? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.localeId = localeId
            self.nextToken = nextToken
            self.slotTypeSummaries = slotTypeSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case localeId
            case nextToken
            case slotTypeSummaries
        }
    }

    public struct ListSlotsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "intentId", location: .uri("intentId")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the bot that contains the slot.
        public let botId: String
        /// The version of the bot that contains the slot.
        public let botVersion: String
        /// Provides the specification of a filter used to limit the slots in the response to only those that match the filter specification. You can only specify one filter and only one string to filter on.
        public let filters: [SlotFilter]?
        /// The unique identifier of the intent that contains the slot.
        public let intentId: String
        /// The identifier of the language and locale of the slots to list. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// The maximum number of slots to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the ListSlots operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.
        public let nextToken: String?
        /// Determines the sort order for the response from the ListSlots operation. You can choose to sort by the slot name or last updated date in either ascending or descending order.
        public let sortBy: SlotSortBy?

        public init(botId: String, botVersion: String, filters: [SlotFilter]? = nil, intentId: String, localeId: String, maxResults: Int? = nil, nextToken: String? = nil, sortBy: SlotSortBy? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.filters = filters
            self.intentId = intentId
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sortBy = sortBy
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.intentId, name: "intentId", parent: name, max: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, min: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filters
            case maxResults
            case nextToken
            case sortBy
        }
    }

    public struct ListSlotsResponse: AWSDecodableShape {
        /// The identifier of the bot that contains the slots.
        public let botId: String?
        /// The version of the bot that contains the slots.
        public let botVersion: String?
        /// The identifier of the intent that contains the slots.
        public let intentId: String?
        /// The language and locale of the slots in the list.
        public let localeId: String?
        /// A token that indicates whether there are more results to return in a response to the ListSlots operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListSlots operation request to get the next page of results.
        public let nextToken: String?
        /// Summary information for the slots that meet the filter criteria specified in the request. The length of the list is specified in the maxResults parameter of the request. If there are more slots available, the nextToken field contains a token to get the next page of results.
        public let slotSummaries: [SlotSummary]?

        public init(botId: String? = nil, botVersion: String? = nil, intentId: String? = nil, localeId: String? = nil, nextToken: String? = nil, slotSummaries: [SlotSummary]? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.intentId = intentId
            self.localeId = localeId
            self.nextToken = nextToken
            self.slotSummaries = slotSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case intentId
            case localeId
            case nextToken
            case slotSummaries
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceARN", location: .uri("resourceARN"))
        ]

        /// The Amazon Resource Name (ARN) of the resource to get a list of tags for.
        public let resourceARN: String

        public init(resourceARN: String) {
            self.resourceARN = resourceARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags associated with a resource.
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct Message: AWSEncodableShape & AWSDecodableShape {
        /// A message in a custom format defined by the client application.
        public let customPayload: CustomPayload?
        /// A message that defines a response card that the client application can show to the user.
        public let imageResponseCard: ImageResponseCard?
        /// A message in plain text format.
        public let plainTextMessage: PlainTextMessage?
        /// A message in Speech Synthesis Markup Language (SSML).
        public let ssmlMessage: SSMLMessage?

        public init(customPayload: CustomPayload? = nil, imageResponseCard: ImageResponseCard? = nil, plainTextMessage: PlainTextMessage? = nil, ssmlMessage: SSMLMessage? = nil) {
            self.customPayload = customPayload
            self.imageResponseCard = imageResponseCard
            self.plainTextMessage = plainTextMessage
            self.ssmlMessage = ssmlMessage
        }

        public func validate(name: String) throws {
            try self.customPayload?.validate(name: "\(name).customPayload")
            try self.imageResponseCard?.validate(name: "\(name).imageResponseCard")
            try self.plainTextMessage?.validate(name: "\(name).plainTextMessage")
            try self.ssmlMessage?.validate(name: "\(name).ssmlMessage")
        }

        private enum CodingKeys: String, CodingKey {
            case customPayload
            case imageResponseCard
            case plainTextMessage
            case ssmlMessage
        }
    }

    public struct MessageGroup: AWSEncodableShape & AWSDecodableShape {
        /// The primary message that Amazon Lex should send to the user.
        public let message: Message
        /// Message variations to send to the user. When variations are defined, Amazon Lex chooses the primary message or one of the variations to send to the user.
        public let variations: [Message]?

        public init(message: Message, variations: [Message]? = nil) {
            self.message = message
            self.variations = variations
        }

        public func validate(name: String) throws {
            try self.message.validate(name: "\(name).message")
            try self.variations?.forEach {
                try $0.validate(name: "\(name).variations[]")
            }
            try self.validate(self.variations, name: "variations", parent: name, max: 2)
        }

        private enum CodingKeys: String, CodingKey {
            case message
            case variations
        }
    }

    public struct MultipleValuesSetting: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether a slot can return multiple values. When true, the slot may return more than one value in a response. When false, the slot returns only a single value. Multi-value slots are only available in the en-US locale. If you set this value to true in any other locale, Amazon Lex throws a ValidationException. If the allowMutlipleValues is not set, the default value is false.
        public let allowMultipleValues: Bool?

        public init(allowMultipleValues: Bool? = nil) {
            self.allowMultipleValues = allowMultipleValues
        }

        private enum CodingKeys: String, CodingKey {
            case allowMultipleValues
        }
    }

    public struct NewCustomVocabularyItem: AWSEncodableShape {
        /// The display as value assigned to the new custom vocabulary item from the custom  vocabulary list.
        public let displayAs: String?
        /// The unique phrase for the new custom vocabulary item from the custom  vocabulary list.
        public let phrase: String
        /// The weight assigned to the new custom vocabulary item from the custom  vocabulary list.
        public let weight: Int?

        public init(displayAs: String? = nil, phrase: String, weight: Int? = nil) {
            self.displayAs = displayAs
            self.phrase = phrase
            self.weight = weight
        }

        public func validate(name: String) throws {
            try self.validate(self.displayAs, name: "displayAs", parent: name, max: 100)
            try self.validate(self.displayAs, name: "displayAs", parent: name, min: 1)
            try self.validate(self.phrase, name: "phrase", parent: name, max: 100)
            try self.validate(self.phrase, name: "phrase", parent: name, min: 1)
            try self.validate(self.weight, name: "weight", parent: name, max: 3)
            try self.validate(self.weight, name: "weight", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case displayAs
            case phrase
            case weight
        }
    }

    public struct ObfuscationSetting: AWSEncodableShape & AWSDecodableShape {
        /// Value that determines whether Amazon Lex obscures slot values in conversation logs. The default is to obscure the values.
        public let obfuscationSettingType: ObfuscationSettingType

        public init(obfuscationSettingType: ObfuscationSettingType) {
            self.obfuscationSettingType = obfuscationSettingType
        }

        private enum CodingKeys: String, CodingKey {
            case obfuscationSettingType
        }
    }

    public struct OutputContext: AWSEncodableShape & AWSDecodableShape {
        /// The name of the output context.
        public let name: String
        /// The amount of time, in seconds, that the output context should remain active. The time is figured from the first time the context is sent to the user.
        public let timeToLiveInSeconds: Int
        /// The number of conversation turns that the output context should remain active. The number of turns is counted from the first time that the context is sent to the user.
        public let turnsToLive: Int

        public init(name: String, timeToLiveInSeconds: Int, turnsToLive: Int) {
            self.name = name
            self.timeToLiveInSeconds = timeToLiveInSeconds
            self.turnsToLive = turnsToLive
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.validate(self.timeToLiveInSeconds, name: "timeToLiveInSeconds", parent: name, max: 86400)
            try self.validate(self.timeToLiveInSeconds, name: "timeToLiveInSeconds", parent: name, min: 5)
            try self.validate(self.turnsToLive, name: "turnsToLive", parent: name, max: 20)
            try self.validate(self.turnsToLive, name: "turnsToLive", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case timeToLiveInSeconds
            case turnsToLive
        }
    }

    public struct PathFormat: AWSEncodableShape & AWSDecodableShape {
        /// A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.
        public let objectPrefixes: [String]?

        public init(objectPrefixes: [String]? = nil) {
            self.objectPrefixes = objectPrefixes
        }

        public func validate(name: String) throws {
            try self.objectPrefixes?.forEach {
                try validate($0, name: "objectPrefixes[]", parent: name, min: 1)
                try validate($0, name: "objectPrefixes[]", parent: name, pattern: "^[\\/]?+[a-zA-Z0-9!_.*'()-]+(\\/[a-zA-Z0-9!_.*'()-]+)*$")
            }
            try self.validate(self.objectPrefixes, name: "objectPrefixes", parent: name, max: 2)
            try self.validate(self.objectPrefixes, name: "objectPrefixes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case objectPrefixes
        }
    }

    public struct PlainTextMessage: AWSEncodableShape & AWSDecodableShape {
        /// The message to send to the user.
        public let value: String

        public init(value: String) {
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.value, name: "value", parent: name, max: 1000)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case value
        }
    }

    public struct PostDialogCodeHookInvocationSpecification: AWSEncodableShape & AWSDecodableShape {
        /// A list of conditional branches to evaluate after the dialog code hook throws an exception or returns with the State field of the Intent object set to Failed.
        public let failureConditional: ConditionalSpecification?
        /// Specifies the next step the bot runs after the dialog code hook throws an exception or returns with the State field of the Intent object set to Failed.
        public let failureNextStep: DialogState?
        public let failureResponse: ResponseSpecification?
        /// A list of conditional branches to evaluate after the dialog code hook finishes successfully.
        public let successConditional: ConditionalSpecification?
        /// Specifics the next step the bot runs after the dialog code hook finishes successfully.
        public let successNextStep: DialogState?
        public let successResponse: ResponseSpecification?
        /// A list of conditional branches to evaluate if the code hook times out.
        public let timeoutConditional: ConditionalSpecification?
        /// Specifies the next step that the bot runs when the code hook times out.
        public let timeoutNextStep: DialogState?
        public let timeoutResponse: ResponseSpecification?

        public init(failureConditional: ConditionalSpecification? = nil, failureNextStep: DialogState? = nil, failureResponse: ResponseSpecification? = nil, successConditional: ConditionalSpecification? = nil, successNextStep: DialogState? = nil, successResponse: ResponseSpecification? = nil, timeoutConditional: ConditionalSpecification? = nil, timeoutNextStep: DialogState? = nil, timeoutResponse: ResponseSpecification? = nil) {
            self.failureConditional = failureConditional
            self.failureNextStep = failureNextStep
            self.failureResponse = failureResponse
            self.successConditional = successConditional
            self.successNextStep = successNextStep
            self.successResponse = successResponse
            self.timeoutConditional = timeoutConditional
            self.timeoutNextStep = timeoutNextStep
            self.timeoutResponse = timeoutResponse
        }

        public func validate(name: String) throws {
            try self.failureConditional?.validate(name: "\(name).failureConditional")
            try self.failureNextStep?.validate(name: "\(name).failureNextStep")
            try self.failureResponse?.validate(name: "\(name).failureResponse")
            try self.successConditional?.validate(name: "\(name).successConditional")
            try self.successNextStep?.validate(name: "\(name).successNextStep")
            try self.successResponse?.validate(name: "\(name).successResponse")
            try self.timeoutConditional?.validate(name: "\(name).timeoutConditional")
            try self.timeoutNextStep?.validate(name: "\(name).timeoutNextStep")
            try self.timeoutResponse?.validate(name: "\(name).timeoutResponse")
        }

        private enum CodingKeys: String, CodingKey {
            case failureConditional
            case failureNextStep
            case failureResponse
            case successConditional
            case successNextStep
            case successResponse
            case timeoutConditional
            case timeoutNextStep
            case timeoutResponse
        }
    }

    public struct PostFulfillmentStatusSpecification: AWSEncodableShape & AWSDecodableShape {
        /// A list of conditional branches to evaluate after the fulfillment code hook throws an exception or returns with the State field of the Intent object set to Failed.
        public let failureConditional: ConditionalSpecification?
        /// Specifies the next step the bot runs after the fulfillment code hook throws an exception or returns with the State field of the Intent object set to Failed.
        public let failureNextStep: DialogState?
        public let failureResponse: ResponseSpecification?
        /// A list of conditional branches to evaluate after the fulfillment code hook finishes successfully.
        public let successConditional: ConditionalSpecification?
        /// Specifies the next step in the conversation that Amazon Lex invokes when the fulfillment code hook completes successfully.
        public let successNextStep: DialogState?
        public let successResponse: ResponseSpecification?
        /// A list of conditional branches to evaluate if the fulfillment code hook times out.
        public let timeoutConditional: ConditionalSpecification?
        /// Specifies the next step that the bot runs when the fulfillment code hook times out.
        public let timeoutNextStep: DialogState?
        public let timeoutResponse: ResponseSpecification?

        public init(failureConditional: ConditionalSpecification? = nil, failureNextStep: DialogState? = nil, failureResponse: ResponseSpecification? = nil, successConditional: ConditionalSpecification? = nil, successNextStep: DialogState? = nil, successResponse: ResponseSpecification? = nil, timeoutConditional: ConditionalSpecification? = nil, timeoutNextStep: DialogState? = nil, timeoutResponse: ResponseSpecification? = nil) {
            self.failureConditional = failureConditional
            self.failureNextStep = failureNextStep
            self.failureResponse = failureResponse
            self.successConditional = successConditional
            self.successNextStep = successNextStep
            self.successResponse = successResponse
            self.timeoutConditional = timeoutConditional
            self.timeoutNextStep = timeoutNextStep
            self.timeoutResponse = timeoutResponse
        }

        public func validate(name: String) throws {
            try self.failureConditional?.validate(name: "\(name).failureConditional")
            try self.failureNextStep?.validate(name: "\(name).failureNextStep")
            try self.failureResponse?.validate(name: "\(name).failureResponse")
            try self.successConditional?.validate(name: "\(name).successConditional")
            try self.successNextStep?.validate(name: "\(name).successNextStep")
            try self.successResponse?.validate(name: "\(name).successResponse")
            try self.timeoutConditional?.validate(name: "\(name).timeoutConditional")
            try self.timeoutNextStep?.validate(name: "\(name).timeoutNextStep")
            try self.timeoutResponse?.validate(name: "\(name).timeoutResponse")
        }

        private enum CodingKeys: String, CodingKey {
            case failureConditional
            case failureNextStep
            case failureResponse
            case successConditional
            case successNextStep
            case successResponse
            case timeoutConditional
            case timeoutNextStep
            case timeoutResponse
        }
    }

    public struct Principal: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the principal.
        public let arn: String?
        /// The name of the AWS service that should allowed or denied access to an Amazon Lex action.
        public let service: String?

        public init(arn: String? = nil, service: String? = nil) {
            self.arn = arn
            self.service = service
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 1024)
            try self.validate(self.arn, name: "arn", parent: name, min: 30)
            try self.validate(self.arn, name: "arn", parent: name, pattern: "^arn:aws:iam::[0-9]{12}:(root|(user|role)/.*)$")
            try self.validate(self.service, name: "service", parent: name, max: 1024)
            try self.validate(self.service, name: "service", parent: name, min: 15)
            try self.validate(self.service, name: "service", parent: name, pattern: "^[0-9a-zA-Z_.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case service
        }
    }

    public struct PromptAttemptSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Indicates the allowed input types of the prompt attempt.
        public let allowedInputTypes: AllowedInputTypes
        /// Indicates whether the user can interrupt a speech prompt attempt from the bot.
        public let allowInterrupt: Bool?
        /// Specifies the settings on audio and DTMF input.
        public let audioAndDTMFInputSpecification: AudioAndDTMFInputSpecification?
        /// Specifies the settings on text input.
        public let textInputSpecification: TextInputSpecification?

        public init(allowedInputTypes: AllowedInputTypes, allowInterrupt: Bool? = nil, audioAndDTMFInputSpecification: AudioAndDTMFInputSpecification? = nil, textInputSpecification: TextInputSpecification? = nil) {
            self.allowedInputTypes = allowedInputTypes
            self.allowInterrupt = allowInterrupt
            self.audioAndDTMFInputSpecification = audioAndDTMFInputSpecification
            self.textInputSpecification = textInputSpecification
        }

        public func validate(name: String) throws {
            try self.audioAndDTMFInputSpecification?.validate(name: "\(name).audioAndDTMFInputSpecification")
            try self.textInputSpecification?.validate(name: "\(name).textInputSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case allowedInputTypes
            case allowInterrupt
            case audioAndDTMFInputSpecification
            case textInputSpecification
        }
    }

    public struct PromptSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether the user can interrupt a speech prompt from the bot.
        public let allowInterrupt: Bool?
        /// The maximum number of times the bot tries to elicit a response from the user using this prompt.
        public let maxRetries: Int
        /// A collection of messages that Amazon Lex can send to the user. Amazon Lex chooses the actual message to send at runtime.
        public let messageGroups: [MessageGroup]
        /// Indicates how a message is selected from a message group among retries.
        public let messageSelectionStrategy: MessageSelectionStrategy?
        /// Specifies the advanced settings on each attempt of the prompt.
        public let promptAttemptsSpecification: [PromptAttempt: PromptAttemptSpecification]?

        public init(allowInterrupt: Bool? = nil, maxRetries: Int, messageGroups: [MessageGroup], messageSelectionStrategy: MessageSelectionStrategy? = nil, promptAttemptsSpecification: [PromptAttempt: PromptAttemptSpecification]? = nil) {
            self.allowInterrupt = allowInterrupt
            self.maxRetries = maxRetries
            self.messageGroups = messageGroups
            self.messageSelectionStrategy = messageSelectionStrategy
            self.promptAttemptsSpecification = promptAttemptsSpecification
        }

        public func validate(name: String) throws {
            try self.validate(self.maxRetries, name: "maxRetries", parent: name, max: 5)
            try self.validate(self.maxRetries, name: "maxRetries", parent: name, min: 0)
            try self.messageGroups.forEach {
                try $0.validate(name: "\(name).messageGroups[]")
            }
            try self.validate(self.messageGroups, name: "messageGroups", parent: name, max: 5)
            try self.validate(self.messageGroups, name: "messageGroups", parent: name, min: 1)
            try self.promptAttemptsSpecification?.forEach {
                try $0.value.validate(name: "\(name).promptAttemptsSpecification[\"\($0.key)\"]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case allowInterrupt
            case maxRetries
            case messageGroups
            case messageSelectionStrategy
            case promptAttemptsSpecification
        }
    }

    public struct RecommendedIntentSummary: AWSDecodableShape {
        /// The unique identifier of a recommended intent associated with the bot recommendation.
        public let intentId: String?
        /// The name of a recommended intent associated with the bot recommendation.
        public let intentName: String?
        /// The count of sample utterances of a recommended intent that is associated with a bot recommendation.
        public let sampleUtterancesCount: Int?

        public init(intentId: String? = nil, intentName: String? = nil, sampleUtterancesCount: Int? = nil) {
            self.intentId = intentId
            self.intentName = intentName
            self.sampleUtterancesCount = sampleUtterancesCount
        }

        private enum CodingKeys: String, CodingKey {
            case intentId
            case intentName
            case sampleUtterancesCount
        }
    }

    public struct RelativeAggregationDuration: AWSEncodableShape & AWSDecodableShape {
        /// The type of time period that the timeValue field represents.
        public let timeDimension: TimeDimension
        /// The period of the time window to gather statistics for. The valid value depends on the setting of the timeDimension field.    Hours - 1/3/6/12/24    Days - 3    Weeks - 1/2
        public let timeValue: Int

        public init(timeDimension: TimeDimension, timeValue: Int) {
            self.timeDimension = timeDimension
            self.timeValue = timeValue
        }

        public func validate(name: String) throws {
            try self.validate(self.timeValue, name: "timeValue", parent: name, max: 24)
            try self.validate(self.timeValue, name: "timeValue", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case timeDimension
            case timeValue
        }
    }

    public struct ResponseSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether the user can interrupt a speech response from Amazon Lex.
        public let allowInterrupt: Bool?
        /// A collection of responses that Amazon Lex can send to the user. Amazon Lex chooses the actual response to send at runtime.
        public let messageGroups: [MessageGroup]

        public init(allowInterrupt: Bool? = nil, messageGroups: [MessageGroup]) {
            self.allowInterrupt = allowInterrupt
            self.messageGroups = messageGroups
        }

        public func validate(name: String) throws {
            try self.messageGroups.forEach {
                try $0.validate(name: "\(name).messageGroups[]")
            }
            try self.validate(self.messageGroups, name: "messageGroups", parent: name, max: 5)
            try self.validate(self.messageGroups, name: "messageGroups", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case allowInterrupt
            case messageGroups
        }
    }

    public struct S3BucketLogDestination: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of an AWS Key Management Service (KMS) key for encrypting audio log files stored in an S3 bucket.
        public let kmsKeyArn: String?
        /// The S3 prefix to assign to audio log files.
        public let logPrefix: String
        /// The Amazon Resource Name (ARN) of an Amazon S3 bucket where audio log files are stored.
        public let s3BucketArn: String

        public init(kmsKeyArn: String? = nil, logPrefix: String, s3BucketArn: String) {
            self.kmsKeyArn = kmsKeyArn
            self.logPrefix = logPrefix
            self.s3BucketArn = s3BucketArn
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, max: 2048)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, min: 20)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, pattern: "^arn:[\\w\\-]+:kms:[\\w\\-]+:[\\d]{12}:(?:key\\/[\\w\\-]+|alias\\/[a-zA-Z0-9:\\/_\\-]{1,256})$")
            try self.validate(self.logPrefix, name: "logPrefix", parent: name, max: 1024)
            try self.validate(self.s3BucketArn, name: "s3BucketArn", parent: name, max: 2048)
            try self.validate(self.s3BucketArn, name: "s3BucketArn", parent: name, min: 1)
            try self.validate(self.s3BucketArn, name: "s3BucketArn", parent: name, pattern: "^arn:[\\w\\-]+:s3:::[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyArn
            case logPrefix
            case s3BucketArn
        }
    }

    public struct S3BucketTranscriptSource: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the KMS key that customer use to encrypt their Amazon S3 bucket. Only use this field if your bucket is encrypted using a customer managed KMS key.
        public let kmsKeyArn: String?
        /// The object that contains a path format that will be applied when Amazon Lex reads the transcript file in the bucket you provide. Specify this object if you only want Lex to read a subset of files in your Amazon S3 bucket.
        public let pathFormat: PathFormat?
        /// The name of the bucket containing the transcript and the associated metadata.
        public let s3BucketName: String
        /// The object that contains the filter which will be applied when Amazon Lex reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to read only a subset of the Amazon S3 bucket based on the filter you provide.
        public let transcriptFilter: TranscriptFilter?
        /// The format of the transcript content. Currently, Genie only supports the Amazon Lex transcript format.
        public let transcriptFormat: TranscriptFormat

        public init(kmsKeyArn: String? = nil, pathFormat: PathFormat? = nil, s3BucketName: String, transcriptFilter: TranscriptFilter? = nil, transcriptFormat: TranscriptFormat) {
            self.kmsKeyArn = kmsKeyArn
            self.pathFormat = pathFormat
            self.s3BucketName = s3BucketName
            self.transcriptFilter = transcriptFilter
            self.transcriptFormat = transcriptFormat
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, max: 2048)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, min: 20)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, pattern: "^arn:[\\w\\-]+:kms:[\\w\\-]+:[\\d]{12}:(?:key\\/[\\w\\-]+|alias\\/[a-zA-Z0-9:\\/_\\-]{1,256})$")
            try self.pathFormat?.validate(name: "\(name).pathFormat")
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, max: 63)
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, min: 3)
            try self.validate(self.s3BucketName, name: "s3BucketName", parent: name, pattern: "^[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]$")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyArn
            case pathFormat
            case s3BucketName
            case transcriptFilter
            case transcriptFormat
        }
    }

    public struct SSMLMessage: AWSEncodableShape & AWSDecodableShape {
        /// The SSML text that defines the prompt.
        public let value: String

        public init(value: String) {
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.value, name: "value", parent: name, max: 1000)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case value
        }
    }

    public struct SampleUtterance: AWSEncodableShape & AWSDecodableShape {
        /// The sample utterance that Amazon Lex uses to build its machine-learning model to recognize intents.
        public let utterance: String

        public init(utterance: String) {
            self.utterance = utterance
        }

        private enum CodingKeys: String, CodingKey {
            case utterance
        }
    }

    public struct SampleValue: AWSEncodableShape & AWSDecodableShape {
        /// The value that can be used for a slot type.
        public let value: String

        public init(value: String) {
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.value, name: "value", parent: name, max: 140)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case value
        }
    }

    public struct SearchAssociatedTranscriptsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botRecommendationId", location: .uri("botRecommendationId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot associated with the transcripts that you are searching.
        public let botId: String
        /// The unique identifier of the bot recommendation associated with the transcripts to search.
        public let botRecommendationId: String
        /// The version of the bot containing the transcripts that you are searching.
        public let botVersion: String
        /// A list of filter objects.
        public let filters: [AssociatedTranscriptFilter]
        /// The identifier of the language and locale of the transcripts to search. The string must match one of the supported locales. For more information, see Supported languages
        public let localeId: String
        /// The maximum number of bot recommendations to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
        public let maxResults: Int?
        /// If the response from the SearchAssociatedTranscriptsRequest operation contains more results than specified in the maxResults parameter, an index is returned in the response. Use that index in the nextIndex parameter to return the next page of results.
        public let nextIndex: Int?
        /// How SearchResults are ordered. Valid values are Ascending or Descending. The default is Descending.
        public let searchOrder: SearchOrder?

        public init(botId: String, botRecommendationId: String, botVersion: String, filters: [AssociatedTranscriptFilter], localeId: String, maxResults: Int? = nil, nextIndex: Int? = nil, searchOrder: SearchOrder? = nil) {
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botVersion = botVersion
            self.filters = filters
            self.localeId = localeId
            self.maxResults = maxResults
            self.nextIndex = nextIndex
            self.searchOrder = searchOrder
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, max: 10)
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, min: 10)
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.filters.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextIndex, name: "nextIndex", parent: name, max: 10_000_000)
            try self.validate(self.nextIndex, name: "nextIndex", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case filters
            case maxResults
            case nextIndex
            case searchOrder
        }
    }

    public struct SearchAssociatedTranscriptsResponse: AWSDecodableShape {
        /// The object that contains the associated transcript that meet the criteria you specified.
        public let associatedTranscripts: [AssociatedTranscript]?
        /// The unique identifier of the bot associated with the transcripts that you are searching.
        public let botId: String?
        ///  The unique identifier of the bot recommendation associated with the transcripts to search.
        public let botRecommendationId: String?
        /// The version of the bot containing the transcripts that you are searching.
        public let botVersion: String?
        /// The identifier of the language and locale of the transcripts to search. The string must match one of the supported locales. For more information, see Supported languages
        public let localeId: String?
        /// A index that indicates whether there are more results to return in a response to the SearchAssociatedTranscripts operation. If the nextIndex field is present, you send the contents as the nextIndex parameter of a SearchAssociatedTranscriptsRequest operation to get the next page of results.
        public let nextIndex: Int?
        /// The total number of transcripts returned by the search.
        public let totalResults: Int?

        public init(associatedTranscripts: [AssociatedTranscript]? = nil, botId: String? = nil, botRecommendationId: String? = nil, botVersion: String? = nil, localeId: String? = nil, nextIndex: Int? = nil, totalResults: Int? = nil) {
            self.associatedTranscripts = associatedTranscripts
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botVersion = botVersion
            self.localeId = localeId
            self.nextIndex = nextIndex
            self.totalResults = totalResults
        }

        private enum CodingKeys: String, CodingKey {
            case associatedTranscripts
            case botId
            case botRecommendationId
            case botVersion
            case localeId
            case nextIndex
            case totalResults
        }
    }

    public struct SentimentAnalysisSettings: AWSEncodableShape & AWSDecodableShape {
        /// Sets whether Amazon Lex uses Amazon Comprehend to detect the sentiment of user utterances.
        public let detectSentiment: Bool

        public init(detectSentiment: Bool) {
            self.detectSentiment = detectSentiment
        }

        private enum CodingKeys: String, CodingKey {
            case detectSentiment
        }
    }

    public struct SlotCaptureSetting: AWSEncodableShape & AWSDecodableShape {
        /// A list of conditional branches to evaluate after the slot value is captured.
        public let captureConditional: ConditionalSpecification?
        /// Specifies the next step that the bot runs when the slot value is captured before the code hook times out.
        public let captureNextStep: DialogState?
        public let captureResponse: ResponseSpecification?
        /// Code hook called after Amazon Lex successfully captures a slot value.
        public let codeHook: DialogCodeHookInvocationSetting?
        /// Code hook called when Amazon Lex doesn't capture a slot value.
        public let elicitationCodeHook: ElicitationCodeHookInvocationSetting?
        /// A list of conditional branches to evaluate when the slot value isn't captured.
        public let failureConditional: ConditionalSpecification?
        /// Specifies the next step that the bot runs when the slot value code is not recognized.
        public let failureNextStep: DialogState?
        public let failureResponse: ResponseSpecification?

        public init(captureConditional: ConditionalSpecification? = nil, captureNextStep: DialogState? = nil, captureResponse: ResponseSpecification? = nil, codeHook: DialogCodeHookInvocationSetting? = nil, elicitationCodeHook: ElicitationCodeHookInvocationSetting? = nil, failureConditional: ConditionalSpecification? = nil, failureNextStep: DialogState? = nil, failureResponse: ResponseSpecification? = nil) {
            self.captureConditional = captureConditional
            self.captureNextStep = captureNextStep
            self.captureResponse = captureResponse
            self.codeHook = codeHook
            self.elicitationCodeHook = elicitationCodeHook
            self.failureConditional = failureConditional
            self.failureNextStep = failureNextStep
            self.failureResponse = failureResponse
        }

        public func validate(name: String) throws {
            try self.captureConditional?.validate(name: "\(name).captureConditional")
            try self.captureNextStep?.validate(name: "\(name).captureNextStep")
            try self.captureResponse?.validate(name: "\(name).captureResponse")
            try self.codeHook?.validate(name: "\(name).codeHook")
            try self.elicitationCodeHook?.validate(name: "\(name).elicitationCodeHook")
            try self.failureConditional?.validate(name: "\(name).failureConditional")
            try self.failureNextStep?.validate(name: "\(name).failureNextStep")
            try self.failureResponse?.validate(name: "\(name).failureResponse")
        }

        private enum CodingKeys: String, CodingKey {
            case captureConditional
            case captureNextStep
            case captureResponse
            case codeHook
            case elicitationCodeHook
            case failureConditional
            case failureNextStep
            case failureResponse
        }
    }

    public struct SlotDefaultValue: AWSEncodableShape & AWSDecodableShape {
        /// The default value to use when a user doesn't provide a value for a slot.
        public let defaultValue: String

        public init(defaultValue: String) {
            self.defaultValue = defaultValue
        }

        public func validate(name: String) throws {
            try self.validate(self.defaultValue, name: "defaultValue", parent: name, max: 202)
            try self.validate(self.defaultValue, name: "defaultValue", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValue
        }
    }

    public struct SlotDefaultValueSpecification: AWSEncodableShape & AWSDecodableShape {
        /// A list of default values. Amazon Lex chooses the default value to use in the order that they are presented in the list.
        public let defaultValueList: [SlotDefaultValue]

        public init(defaultValueList: [SlotDefaultValue]) {
            self.defaultValueList = defaultValueList
        }

        public func validate(name: String) throws {
            try self.defaultValueList.forEach {
                try $0.validate(name: "\(name).defaultValueList[]")
            }
            try self.validate(self.defaultValueList, name: "defaultValueList", parent: name, max: 10)
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValueList
        }
    }

    public struct SlotFilter: AWSEncodableShape {
        /// The name of the field to use for filtering.
        public let name: SlotFilterName
        /// The operator to use for the filter. Specify EQ when the ListSlots operation should return only aliases that equal the specified value. Specify CO when the ListSlots operation should return aliases that contain the specified value.
        public let `operator`: SlotFilterOperator
        /// The value to use to filter the response.
        public let values: [String]

        public init(name: SlotFilterName, operator: SlotFilterOperator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 100)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_()\\s-]+$")
            }
            try self.validate(self.values, name: "values", parent: name, max: 1)
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case `operator`
            case values
        }
    }

    public struct SlotPriority: AWSEncodableShape & AWSDecodableShape {
        /// The priority that a slot should be elicited.
        public let priority: Int
        /// The unique identifier of the slot.
        public let slotId: String

        public init(priority: Int, slotId: String) {
            self.priority = priority
            self.slotId = slotId
        }

        public func validate(name: String) throws {
            try self.validate(self.priority, name: "priority", parent: name, max: 100)
            try self.validate(self.priority, name: "priority", parent: name, min: 0)
            try self.validate(self.slotId, name: "slotId", parent: name, max: 10)
            try self.validate(self.slotId, name: "slotId", parent: name, min: 10)
            try self.validate(self.slotId, name: "slotId", parent: name, pattern: "^[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case priority
            case slotId
        }
    }

    public struct SlotSortBy: AWSEncodableShape {
        /// The attribute to use to sort the list.
        public let attribute: SlotSortAttribute
        /// The order to sort the list. You can choose ascending or descending.
        public let order: SortOrder

        public init(attribute: SlotSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct SlotSummary: AWSDecodableShape {
        /// The description of the slot.
        public let description: String?
        /// The timestamp of the last date and time that the slot was updated.
        public let lastUpdatedDateTime: Date?
        /// Whether the slot is required or optional. An intent is complete when all required slots are filled.
        public let slotConstraint: SlotConstraint?
        /// The unique identifier of the slot.
        public let slotId: String?
        /// The name given to the slot.
        public let slotName: String?
        /// The unique identifier for the slot type that defines the values for the slot.
        public let slotTypeId: String?
        /// Prompts that are sent to the user to elicit a value for the slot.
        public let valueElicitationPromptSpecification: PromptSpecification?

        public init(description: String? = nil, lastUpdatedDateTime: Date? = nil, slotConstraint: SlotConstraint? = nil, slotId: String? = nil, slotName: String? = nil, slotTypeId: String? = nil, valueElicitationPromptSpecification: PromptSpecification? = nil) {
            self.description = description
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.slotConstraint = slotConstraint
            self.slotId = slotId
            self.slotName = slotName
            self.slotTypeId = slotTypeId
            self.valueElicitationPromptSpecification = valueElicitationPromptSpecification
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case lastUpdatedDateTime
            case slotConstraint
            case slotId
            case slotName
            case slotTypeId
            case valueElicitationPromptSpecification
        }
    }

    public struct SlotTypeFilter: AWSEncodableShape {
        /// The name of the field to use for filtering.
        public let name: SlotTypeFilterName
        /// The operator to use for the filter. Specify EQ when the ListSlotTypes operation should return only aliases that equal the specified value. Specify CO when the ListSlotTypes operation should return aliases that contain the specified value.
        public let `operator`: SlotTypeFilterOperator
        /// The value to use to filter the response.
        public let values: [String]

        public init(name: SlotTypeFilterName, operator: SlotTypeFilterOperator, values: [String]) {
            self.name = name
            self.`operator` = `operator`
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values.forEach {
                try validate($0, name: "values[]", parent: name, max: 100)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[0-9a-zA-Z_()\\s-]+$")
            }
            try self.validate(self.values, name: "values", parent: name, max: 1)
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case `operator`
            case values
        }
    }

    public struct SlotTypeSortBy: AWSEncodableShape {
        /// The attribute to use to sort the list of slot types.
        public let attribute: SlotTypeSortAttribute
        /// The order to sort the list. You can say ascending or descending.
        public let order: SortOrder

        public init(attribute: SlotTypeSortAttribute, order: SortOrder) {
            self.attribute = attribute
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case attribute
            case order
        }
    }

    public struct SlotTypeStatistics: AWSDecodableShape {
        /// The number of recommended slot types associated with the bot recommendation.
        public let discoveredSlotTypeCount: Int?

        public init(discoveredSlotTypeCount: Int? = nil) {
            self.discoveredSlotTypeCount = discoveredSlotTypeCount
        }

        private enum CodingKeys: String, CodingKey {
            case discoveredSlotTypeCount
        }
    }

    public struct SlotTypeSummary: AWSDecodableShape {
        /// The description of the slot type.
        public let description: String?
        /// A timestamp of the date and time that the slot type was last updated.
        public let lastUpdatedDateTime: Date?
        /// If the slot type is derived from a built-on slot type, the name of the parent slot type.
        public let parentSlotTypeSignature: String?
        /// Indicates the type of the slot type.    Custom - A slot type that you created using custom values. For more information, see Creating custom slot types.    Extended - A slot type created by extending the AMAZON.AlphaNumeric built-in slot type. For more information, see AMAZON.AlphaNumeric.    ExternalGrammar - A slot type using a custom GRXML grammar to define values. For more information, see Using a custom grammar slot type.
        public let slotTypeCategory: SlotTypeCategory?
        /// The unique identifier assigned to the slot type.
        public let slotTypeId: String?
        /// The name of the slot type.
        public let slotTypeName: String?

        public init(description: String? = nil, lastUpdatedDateTime: Date? = nil, parentSlotTypeSignature: String? = nil, slotTypeCategory: SlotTypeCategory? = nil, slotTypeId: String? = nil, slotTypeName: String? = nil) {
            self.description = description
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.parentSlotTypeSignature = parentSlotTypeSignature
            self.slotTypeCategory = slotTypeCategory
            self.slotTypeId = slotTypeId
            self.slotTypeName = slotTypeName
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case lastUpdatedDateTime
            case parentSlotTypeSignature
            case slotTypeCategory
            case slotTypeId
            case slotTypeName
        }
    }

    public struct SlotTypeValue: AWSEncodableShape & AWSDecodableShape {
        /// The value of the slot type entry.
        public let sampleValue: SampleValue?
        /// Additional values related to the slot type entry.
        public let synonyms: [SampleValue]?

        public init(sampleValue: SampleValue? = nil, synonyms: [SampleValue]? = nil) {
            self.sampleValue = sampleValue
            self.synonyms = synonyms
        }

        public func validate(name: String) throws {
            try self.sampleValue?.validate(name: "\(name).sampleValue")
            try self.synonyms?.forEach {
                try $0.validate(name: "\(name).synonyms[]")
            }
            try self.validate(self.synonyms, name: "synonyms", parent: name, max: 10000)
            try self.validate(self.synonyms, name: "synonyms", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case sampleValue
            case synonyms
        }
    }

    public struct SlotValue: AWSEncodableShape & AWSDecodableShape {
        /// The value that Amazon Lex determines for the slot. The actual value depends on the setting of the value selection strategy for the bot. You can choose to use the value entered by the user, or you can have Amazon Lex choose the first value in the resolvedValues list.
        public let interpretedValue: String?

        public init(interpretedValue: String? = nil) {
            self.interpretedValue = interpretedValue
        }

        public func validate(name: String) throws {
            try self.validate(self.interpretedValue, name: "interpretedValue", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case interpretedValue
        }
    }

    public struct SlotValueElicitationSetting: AWSEncodableShape & AWSDecodableShape {
        /// A list of default values for a slot. Default values are used when Amazon Lex hasn't determined a value for a slot. You can specify default values from context variables, session attributes, and defined values.
        public let defaultValueSpecification: SlotDefaultValueSpecification?
        /// The prompt that Amazon Lex uses to elicit the slot value from the user.
        public let promptSpecification: PromptSpecification?
        /// If you know a specific pattern that users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances.
        public let sampleUtterances: [SampleUtterance]?
        /// Specifies the settings that Amazon Lex uses when a slot value is successfully entered by a user.
        public let slotCaptureSetting: SlotCaptureSetting?
        /// Specifies whether the slot is required or optional.
        public let slotConstraint: SlotConstraint
        public let waitAndContinueSpecification: WaitAndContinueSpecification?

        public init(defaultValueSpecification: SlotDefaultValueSpecification? = nil, promptSpecification: PromptSpecification? = nil, sampleUtterances: [SampleUtterance]? = nil, slotCaptureSetting: SlotCaptureSetting? = nil, slotConstraint: SlotConstraint, waitAndContinueSpecification: WaitAndContinueSpecification? = nil) {
            self.defaultValueSpecification = defaultValueSpecification
            self.promptSpecification = promptSpecification
            self.sampleUtterances = sampleUtterances
            self.slotCaptureSetting = slotCaptureSetting
            self.slotConstraint = slotConstraint
            self.waitAndContinueSpecification = waitAndContinueSpecification
        }

        public func validate(name: String) throws {
            try self.defaultValueSpecification?.validate(name: "\(name).defaultValueSpecification")
            try self.promptSpecification?.validate(name: "\(name).promptSpecification")
            try self.slotCaptureSetting?.validate(name: "\(name).slotCaptureSetting")
            try self.waitAndContinueSpecification?.validate(name: "\(name).waitAndContinueSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValueSpecification
            case promptSpecification
            case sampleUtterances
            case slotCaptureSetting
            case slotConstraint
            case waitAndContinueSpecification
        }
    }

    public struct SlotValueOverride: AWSEncodableShape & AWSDecodableShape {
        /// When the shape value is List, it indicates that the values field contains a list of slot values. When the value is Scalar, it indicates that the value field contains a single value.
        public let shape: SlotShape?
        /// The current value of the slot.
        public let value: SlotValue?
        /// A list of one or more values that the user provided for the slot. For example, for a slot that elicits pizza toppings, the values might be "pepperoni" and "pineapple."
        public let values: [SlotValueOverride]?

        public init(shape: SlotShape? = nil, value: SlotValue? = nil, values: [SlotValueOverride]? = nil) {
            self.shape = shape
            self.value = value
            self.values = values
        }

        public func validate(name: String) throws {
            try self.value?.validate(name: "\(name).value")
            try self.values?.forEach {
                try $0.validate(name: "\(name).values[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case shape
            case value
            case values
        }
    }

    public struct SlotValueRegexFilter: AWSEncodableShape & AWSDecodableShape {
        /// A regular expression used to validate the value of a slot. Use a standard regular expression. Amazon Lex supports the following characters in the regular expression:    A-Z, a-z   0-9   Unicode characters ("\ u")   Represent Unicode characters with four digits, for example "\u0041" or "\u005A".  The following regular expression operators are not supported:    Infinite repeaters: *, +, or {x,} with no upper bound.   Wild card (.)
        public let pattern: String

        public init(pattern: String) {
            self.pattern = pattern
        }

        public func validate(name: String) throws {
            try self.validate(self.pattern, name: "pattern", parent: name, max: 300)
            try self.validate(self.pattern, name: "pattern", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case pattern
        }
    }

    public struct SlotValueSelectionSetting: AWSEncodableShape & AWSDecodableShape {
        /// Provides settings that enable advanced recognition settings for slot values.
        public let advancedRecognitionSetting: AdvancedRecognitionSetting?
        /// A regular expression used to validate the value of a slot.
        public let regexFilter: SlotValueRegexFilter?
        /// Determines the slot resolution strategy that Amazon Lex uses to return slot type values. The field can be set to one of the following values:
        ///    OriginalValue - Returns the value entered by the user, if the user value is similar to the slot value.   TopResolution - If there is a resolution list for the slot, return the first value in the resolution list as the slot type value. If there is no resolution list, null is returned.
        ///  If you don't specify the valueSelectionStrategy, the default is OriginalValue.
        public let resolutionStrategy: SlotValueResolutionStrategy

        public init(advancedRecognitionSetting: AdvancedRecognitionSetting? = nil, regexFilter: SlotValueRegexFilter? = nil, resolutionStrategy: SlotValueResolutionStrategy) {
            self.advancedRecognitionSetting = advancedRecognitionSetting
            self.regexFilter = regexFilter
            self.resolutionStrategy = resolutionStrategy
        }

        public func validate(name: String) throws {
            try self.regexFilter?.validate(name: "\(name).regexFilter")
        }

        private enum CodingKeys: String, CodingKey {
            case advancedRecognitionSetting
            case regexFilter
            case resolutionStrategy
        }
    }

    public struct Specifications: AWSEncodableShape & AWSDecodableShape {
        /// The unique identifier assigned to the slot type.
        public let slotTypeId: String
        /// Specifies the elicitation setting details for constituent sub slots of a composite slot.
        public let valueElicitationSetting: SubSlotValueElicitationSetting

        public init(slotTypeId: String, valueElicitationSetting: SubSlotValueElicitationSetting) {
            self.slotTypeId = slotTypeId
            self.valueElicitationSetting = valueElicitationSetting
        }

        public func validate(name: String) throws {
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, max: 25)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, min: 1)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, pattern: "^((AMAZON\\.)[a-zA-Z_]+?|[0-9a-zA-Z]+)$")
            try self.valueElicitationSetting.validate(name: "\(name).valueElicitationSetting")
        }

        private enum CodingKeys: String, CodingKey {
            case slotTypeId
            case valueElicitationSetting
        }
    }

    public struct StartBotRecommendationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot containing the bot recommendation.
        public let botId: String
        /// The version of the bot containing the bot recommendation.
        public let botVersion: String
        /// The object representing the passwords that will be used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.
        public let encryptionSetting: EncryptionSetting?
        /// The identifier of the language and locale of the bot recommendation to start. The string must match one of the supported locales. For more information, see Supported languages
        public let localeId: String
        /// The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.
        public let transcriptSourceSetting: TranscriptSourceSetting

        public init(botId: String, botVersion: String, encryptionSetting: EncryptionSetting? = nil, localeId: String, transcriptSourceSetting: TranscriptSourceSetting) {
            self.botId = botId
            self.botVersion = botVersion
            self.encryptionSetting = encryptionSetting
            self.localeId = localeId
            self.transcriptSourceSetting = transcriptSourceSetting
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.encryptionSetting?.validate(name: "\(name).encryptionSetting")
            try self.transcriptSourceSetting.validate(name: "\(name).transcriptSourceSetting")
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionSetting
            case transcriptSourceSetting
        }
    }

    public struct StartBotRecommendationResponse: AWSDecodableShape {
        /// The unique identifier of the bot containing the bot recommendation.
        public let botId: String?
        /// The identifier of the bot recommendation that you have created.
        public let botRecommendationId: String?
        /// The status of the bot recommendation. If the status is Failed, then the reasons for the failure are listed in the failureReasons field.
        public let botRecommendationStatus: BotRecommendationStatus?
        /// The version of the bot containing the bot recommendation.
        public let botVersion: String?
        /// A timestamp of the date and time that the bot recommendation was created.
        public let creationDateTime: Date?
        /// The object representing the passwords that were used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.
        public let encryptionSetting: EncryptionSetting?
        /// The identifier of the language and locale of the bot recommendation to start. The string must match one of the supported locales. For more information, see Supported languages
        public let localeId: String?
        /// The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.
        public let transcriptSourceSetting: TranscriptSourceSetting?

        public init(botId: String? = nil, botRecommendationId: String? = nil, botRecommendationStatus: BotRecommendationStatus? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, encryptionSetting: EncryptionSetting? = nil, localeId: String? = nil, transcriptSourceSetting: TranscriptSourceSetting? = nil) {
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botRecommendationStatus = botRecommendationStatus
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.encryptionSetting = encryptionSetting
            self.localeId = localeId
            self.transcriptSourceSetting = transcriptSourceSetting
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botRecommendationId
            case botRecommendationStatus
            case botVersion
            case creationDateTime
            case encryptionSetting
            case localeId
            case transcriptSourceSetting
        }
    }

    public struct StartImportRequest: AWSEncodableShape {
        /// The password used to encrypt the zip archive that contains the resource definition. You should always encrypt the zip archive to protect it during transit between your site and Amazon Lex.
        public let filePassword: String?
        /// The unique identifier for the import. It is included in the response from the CreateUploadUrl operation.
        public let importId: String
        /// The strategy to use when there is a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.
        public let mergeStrategy: MergeStrategy
        /// Parameters for creating the bot, bot locale or custom vocabulary.
        public let resourceSpecification: ImportResourceSpecification

        public init(filePassword: String? = nil, importId: String, mergeStrategy: MergeStrategy, resourceSpecification: ImportResourceSpecification) {
            self.filePassword = filePassword
            self.importId = importId
            self.mergeStrategy = mergeStrategy
            self.resourceSpecification = resourceSpecification
        }

        public func validate(name: String) throws {
            try self.validate(self.filePassword, name: "filePassword", parent: name, max: 1024)
            try self.validate(self.filePassword, name: "filePassword", parent: name, min: 1)
            try self.validate(self.importId, name: "importId", parent: name, max: 10)
            try self.validate(self.importId, name: "importId", parent: name, min: 10)
            try self.validate(self.importId, name: "importId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.resourceSpecification.validate(name: "\(name).resourceSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case filePassword
            case importId
            case mergeStrategy
            case resourceSpecification
        }
    }

    public struct StartImportResponse: AWSDecodableShape {
        /// The date and time that the import request was created.
        public let creationDateTime: Date?
        /// A unique identifier for the import.
        public let importId: String?
        /// The current status of the import. When the status is Complete the bot, bot alias, or custom vocabulary is ready to use.
        public let importStatus: ImportStatus?
        /// The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is FailOnConflict existing resources are not overwritten and the import fails.
        public let mergeStrategy: MergeStrategy?
        /// The parameters used when importing the resource.
        public let resourceSpecification: ImportResourceSpecification?

        public init(creationDateTime: Date? = nil, importId: String? = nil, importStatus: ImportStatus? = nil, mergeStrategy: MergeStrategy? = nil, resourceSpecification: ImportResourceSpecification? = nil) {
            self.creationDateTime = creationDateTime
            self.importId = importId
            self.importStatus = importStatus
            self.mergeStrategy = mergeStrategy
            self.resourceSpecification = resourceSpecification
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime
            case importId
            case importStatus
            case mergeStrategy
            case resourceSpecification
        }
    }

    public struct StillWaitingResponseSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Indicates that the user can interrupt the response by speaking while the message is being played.
        public let allowInterrupt: Bool?
        /// How often a message should be sent to the user. Minimum of 1 second, maximum of 5 minutes.
        public let frequencyInSeconds: Int
        /// One or more message groups, each containing one or more messages, that define the prompts that Amazon Lex sends to the user.
        public let messageGroups: [MessageGroup]
        /// If Amazon Lex waits longer than this length of time for a response, it will stop sending messages.
        public let timeoutInSeconds: Int

        public init(allowInterrupt: Bool? = nil, frequencyInSeconds: Int, messageGroups: [MessageGroup], timeoutInSeconds: Int) {
            self.allowInterrupt = allowInterrupt
            self.frequencyInSeconds = frequencyInSeconds
            self.messageGroups = messageGroups
            self.timeoutInSeconds = timeoutInSeconds
        }

        public func validate(name: String) throws {
            try self.validate(self.frequencyInSeconds, name: "frequencyInSeconds", parent: name, max: 300)
            try self.validate(self.frequencyInSeconds, name: "frequencyInSeconds", parent: name, min: 1)
            try self.messageGroups.forEach {
                try $0.validate(name: "\(name).messageGroups[]")
            }
            try self.validate(self.messageGroups, name: "messageGroups", parent: name, max: 5)
            try self.validate(self.messageGroups, name: "messageGroups", parent: name, min: 1)
            try self.validate(self.timeoutInSeconds, name: "timeoutInSeconds", parent: name, max: 900)
            try self.validate(self.timeoutInSeconds, name: "timeoutInSeconds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case allowInterrupt
            case frequencyInSeconds
            case messageGroups
            case timeoutInSeconds
        }
    }

    public struct StopBotRecommendationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botRecommendationId", location: .uri("botRecommendationId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot containing the bot recommendation to be stopped.
        public let botId: String
        /// The unique identifier of the bot recommendation to be stopped.
        public let botRecommendationId: String
        /// The version of the bot containing the bot recommendation.
        public let botVersion: String
        /// The identifier of the language and locale of the bot recommendation to stop. The string must match one of the supported locales. For more information, see Supported languages
        public let localeId: String

        public init(botId: String, botRecommendationId: String, botVersion: String, localeId: String) {
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botVersion = botVersion
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, max: 10)
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, min: 10)
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StopBotRecommendationResponse: AWSDecodableShape {
        /// The unique identifier of the bot containing the bot recommendation that  is being stopped.
        public let botId: String?
        /// The unique identifier of the bot recommendation that is being stopped.
        public let botRecommendationId: String?
        /// The status of the bot recommendation. If the status is Failed,  then the reasons for the failure are listed in the failureReasons field.
        public let botRecommendationStatus: BotRecommendationStatus?
        /// The version of the bot containing the recommendation that is being  stopped.
        public let botVersion: String?
        /// The identifier of the language and locale of the bot response to stop. The string must match one of the supported locales. For more information, see Supported languages
        public let localeId: String?

        public init(botId: String? = nil, botRecommendationId: String? = nil, botRecommendationStatus: BotRecommendationStatus? = nil, botVersion: String? = nil, localeId: String? = nil) {
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botRecommendationStatus = botRecommendationStatus
            self.botVersion = botVersion
            self.localeId = localeId
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botRecommendationId
            case botRecommendationStatus
            case botVersion
            case localeId
        }
    }

    public struct SubSlotSetting: AWSEncodableShape & AWSDecodableShape {
        /// The expression text for defining the constituent sub slots in the composite slot using logical AND and OR operators.
        public let expression: String?
        /// Specifications for the constituent sub slots of a composite slot.
        public let slotSpecifications: [String: Specifications]?

        public init(expression: String? = nil, slotSpecifications: [String: Specifications]? = nil) {
            self.expression = expression
            self.slotSpecifications = slotSpecifications
        }

        public func validate(name: String) throws {
            try self.validate(self.expression, name: "expression", parent: name, max: 640)
            try self.validate(self.expression, name: "expression", parent: name, pattern: "^[0-9A-Za-z_\\-\\s\\(\\)]+$")
            try self.slotSpecifications?.forEach {
                try validate($0.key, name: "slotSpecifications.key", parent: name, max: 100)
                try validate($0.key, name: "slotSpecifications.key", parent: name, min: 1)
                try validate($0.key, name: "slotSpecifications.key", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
                try $0.value.validate(name: "\(name).slotSpecifications[\"\($0.key)\"]")
            }
            try self.validate(self.slotSpecifications, name: "slotSpecifications", parent: name, max: 6)
        }

        private enum CodingKeys: String, CodingKey {
            case expression
            case slotSpecifications
        }
    }

    public struct SubSlotTypeComposition: AWSEncodableShape & AWSDecodableShape {
        /// Name of a constituent sub slot inside a composite slot.
        public let name: String
        /// The unique identifier assigned to a slot type.  This refers to either a built-in slot type or the unique slotTypeId of a custom slot type.
        public let slotTypeId: String

        public init(name: String, slotTypeId: String) {
            self.name = name
            self.slotTypeId = slotTypeId
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, max: 25)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, min: 1)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, pattern: "^((AMAZON\\.)[a-zA-Z_]+?|[0-9a-zA-Z]+)$")
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case slotTypeId
        }
    }

    public struct SubSlotValueElicitationSetting: AWSEncodableShape & AWSDecodableShape {
        public let defaultValueSpecification: SlotDefaultValueSpecification?
        public let promptSpecification: PromptSpecification
        /// If you know a specific pattern that users might respond to an Amazon Lex request for a sub slot value,  you can provide those utterances to improve accuracy. This is optional. In most cases Amazon Lex is capable  of understanding user utterances. This is similar to SampleUtterances for slots.
        public let sampleUtterances: [SampleUtterance]?
        public let waitAndContinueSpecification: WaitAndContinueSpecification?

        public init(defaultValueSpecification: SlotDefaultValueSpecification? = nil, promptSpecification: PromptSpecification, sampleUtterances: [SampleUtterance]? = nil, waitAndContinueSpecification: WaitAndContinueSpecification? = nil) {
            self.defaultValueSpecification = defaultValueSpecification
            self.promptSpecification = promptSpecification
            self.sampleUtterances = sampleUtterances
            self.waitAndContinueSpecification = waitAndContinueSpecification
        }

        public func validate(name: String) throws {
            try self.defaultValueSpecification?.validate(name: "\(name).defaultValueSpecification")
            try self.promptSpecification.validate(name: "\(name).promptSpecification")
            try self.waitAndContinueSpecification?.validate(name: "\(name).waitAndContinueSpecification")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValueSpecification
            case promptSpecification
            case sampleUtterances
            case waitAndContinueSpecification
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceARN", location: .uri("resourceARN"))
        ]

        /// The Amazon Resource Name (ARN) of the bot, bot alias, or bot channel to tag.
        public let resourceARN: String
        /// A list of tag keys to add to the resource. If a tag key already exists, the existing value is replaced with the new value.
        public let tags: [String: String]

        public init(resourceARN: String, tags: [String: String]) {
            self.resourceARN = resourceARN
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TextInputSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Time for which a bot waits before re-prompting a customer for text input.
        public let startTimeoutMs: Int

        public init(startTimeoutMs: Int) {
            self.startTimeoutMs = startTimeoutMs
        }

        public func validate(name: String) throws {
            try self.validate(self.startTimeoutMs, name: "startTimeoutMs", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case startTimeoutMs
        }
    }

    public struct TextLogDestination: AWSEncodableShape & AWSDecodableShape {
        /// Defines the Amazon CloudWatch Logs log group where text and metadata logs are delivered.
        public let cloudWatch: CloudWatchLogGroupLogDestination

        public init(cloudWatch: CloudWatchLogGroupLogDestination) {
            self.cloudWatch = cloudWatch
        }

        public func validate(name: String) throws {
            try self.cloudWatch.validate(name: "\(name).cloudWatch")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatch
        }
    }

    public struct TextLogSetting: AWSEncodableShape & AWSDecodableShape {
        public let destination: TextLogDestination
        /// Determines whether conversation logs should be stored for an alias.
        public let enabled: Bool

        public init(destination: TextLogDestination, enabled: Bool) {
            self.destination = destination
            self.enabled = enabled
        }

        public func validate(name: String) throws {
            try self.destination.validate(name: "\(name).destination")
        }

        private enum CodingKeys: String, CodingKey {
            case destination
            case enabled
        }
    }

    public struct TranscriptFilter: AWSEncodableShape & AWSDecodableShape {
        /// The object representing the filter that Amazon Lex will use to select the appropriate transcript when the transcript format is the Amazon Lex format.
        public let lexTranscriptFilter: LexTranscriptFilter?

        public init(lexTranscriptFilter: LexTranscriptFilter? = nil) {
            self.lexTranscriptFilter = lexTranscriptFilter
        }

        private enum CodingKeys: String, CodingKey {
            case lexTranscriptFilter
        }
    }

    public struct TranscriptSourceSetting: AWSEncodableShape & AWSDecodableShape {
        /// Indicates the setting of the Amazon S3 bucket where the transcript is stored.
        public let s3BucketTranscriptSource: S3BucketTranscriptSource?

        public init(s3BucketTranscriptSource: S3BucketTranscriptSource? = nil) {
            self.s3BucketTranscriptSource = s3BucketTranscriptSource
        }

        public func validate(name: String) throws {
            try self.s3BucketTranscriptSource?.validate(name: "\(name).s3BucketTranscriptSource")
        }

        private enum CodingKeys: String, CodingKey {
            case s3BucketTranscriptSource
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceARN", location: .uri("resourceARN")),
            AWSMemberEncoding(label: "tagKeys", location: .querystring("tagKeys"))
        ]

        /// The Amazon Resource Name (ARN) of the resource to remove the tags from.
        public let resourceARN: String
        /// A list of tag keys to remove from the resource. If a tag key does not exist on the resource, it is ignored.
        public let tagKeys: [String]

        public init(resourceARN: String, tagKeys: [String]) {
            self.resourceARN = resourceARN
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateBotAliasRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botAliasId", location: .uri("botAliasId")),
            AWSMemberEncoding(label: "botId", location: .uri("botId"))
        ]

        /// The unique identifier of the bot alias.
        public let botAliasId: String
        /// The new Lambda functions to use in each locale for the bot alias.
        public let botAliasLocaleSettings: [String: BotAliasLocaleSettings]?
        /// The new name to assign to the bot alias.
        public let botAliasName: String
        /// The identifier of the bot with the updated alias.
        public let botId: String
        /// The new bot version to assign to the bot alias.
        public let botVersion: String?
        /// The new settings for storing conversation logs in Amazon CloudWatch Logs and Amazon S3 buckets.
        public let conversationLogSettings: ConversationLogSettings?
        /// The new description to assign to the bot alias.
        public let description: String?
        public let sentimentAnalysisSettings: SentimentAnalysisSettings?

        public init(botAliasId: String, botAliasLocaleSettings: [String: BotAliasLocaleSettings]? = nil, botAliasName: String, botId: String, botVersion: String? = nil, conversationLogSettings: ConversationLogSettings? = nil, description: String? = nil, sentimentAnalysisSettings: SentimentAnalysisSettings? = nil) {
            self.botAliasId = botAliasId
            self.botAliasLocaleSettings = botAliasLocaleSettings
            self.botAliasName = botAliasName
            self.botId = botId
            self.botVersion = botVersion
            self.conversationLogSettings = conversationLogSettings
            self.description = description
            self.sentimentAnalysisSettings = sentimentAnalysisSettings
        }

        public func validate(name: String) throws {
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, max: 10)
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, min: 10)
            try self.validate(self.botAliasId, name: "botAliasId", parent: name, pattern: "^(\\bTSTALIASID\\b|[0-9a-zA-Z]+)$")
            try self.botAliasLocaleSettings?.forEach {
                try $0.value.validate(name: "\(name).botAliasLocaleSettings[\"\($0.key)\"]")
            }
            try self.validate(self.botAliasLocaleSettings, name: "botAliasLocaleSettings", parent: name, min: 1)
            try self.validate(self.botAliasName, name: "botAliasName", parent: name, max: 100)
            try self.validate(self.botAliasName, name: "botAliasName", parent: name, min: 1)
            try self.validate(self.botAliasName, name: "botAliasName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 1)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^(DRAFT|[0-9]+)$")
            try self.conversationLogSettings?.validate(name: "\(name).conversationLogSettings")
            try self.validate(self.description, name: "description", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case botAliasLocaleSettings
            case botAliasName
            case botVersion
            case conversationLogSettings
            case description
            case sentimentAnalysisSettings
        }
    }

    public struct UpdateBotAliasResponse: AWSDecodableShape {
        /// The identifier of the updated bot alias.
        public let botAliasId: String?
        /// The updated Lambda functions to use in each locale for the bot alias.
        public let botAliasLocaleSettings: [String: BotAliasLocaleSettings]?
        /// The updated name of the bot alias.
        public let botAliasName: String?
        /// The current status of the bot alias. When the status is Available the alias is ready for use.
        public let botAliasStatus: BotAliasStatus?
        /// The identifier of the bot with the updated alias.
        public let botId: String?
        /// The updated version of the bot that the alias points to.
        public let botVersion: String?
        /// The updated settings for storing conversation logs in Amazon CloudWatch Logs and Amazon S3 buckets.
        public let conversationLogSettings: ConversationLogSettings?
        /// A timestamp of the date and time that the bot was created.
        public let creationDateTime: Date?
        /// The updated description of the bot alias.
        public let description: String?
        /// A timestamp of the date and time that the bot was last updated.
        public let lastUpdatedDateTime: Date?
        public let sentimentAnalysisSettings: SentimentAnalysisSettings?

        public init(botAliasId: String? = nil, botAliasLocaleSettings: [String: BotAliasLocaleSettings]? = nil, botAliasName: String? = nil, botAliasStatus: BotAliasStatus? = nil, botId: String? = nil, botVersion: String? = nil, conversationLogSettings: ConversationLogSettings? = nil, creationDateTime: Date? = nil, description: String? = nil, lastUpdatedDateTime: Date? = nil, sentimentAnalysisSettings: SentimentAnalysisSettings? = nil) {
            self.botAliasId = botAliasId
            self.botAliasLocaleSettings = botAliasLocaleSettings
            self.botAliasName = botAliasName
            self.botAliasStatus = botAliasStatus
            self.botId = botId
            self.botVersion = botVersion
            self.conversationLogSettings = conversationLogSettings
            self.creationDateTime = creationDateTime
            self.description = description
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.sentimentAnalysisSettings = sentimentAnalysisSettings
        }

        private enum CodingKeys: String, CodingKey {
            case botAliasId
            case botAliasLocaleSettings
            case botAliasName
            case botAliasStatus
            case botId
            case botVersion
            case conversationLogSettings
            case creationDateTime
            case description
            case lastUpdatedDateTime
            case sentimentAnalysisSettings
        }
    }

    public struct UpdateBotLocaleRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot that contains the locale.
        public let botId: String
        /// The version of the bot that contains the locale to be updated. The version can only be the DRAFT version.
        public let botVersion: String
        /// The new description of the locale.
        public let description: String?
        /// The identifier of the language and locale to update. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// The new confidence threshold where Amazon Lex inserts the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents in the list of possible intents for an utterance.
        public let nluIntentConfidenceThreshold: Double
        /// The new Amazon Polly voice Amazon Lex should use for voice interaction with the user.
        public let voiceSettings: VoiceSettings?

        public init(botId: String, botVersion: String, description: String? = nil, localeId: String, nluIntentConfidenceThreshold: Double, voiceSettings: VoiceSettings? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.description = description
            self.localeId = localeId
            self.nluIntentConfidenceThreshold = nluIntentConfidenceThreshold
            self.voiceSettings = voiceSettings
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.nluIntentConfidenceThreshold, name: "nluIntentConfidenceThreshold", parent: name, max: 1.0)
            try self.validate(self.nluIntentConfidenceThreshold, name: "nluIntentConfidenceThreshold", parent: name, min: 0.0)
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case nluIntentConfidenceThreshold
            case voiceSettings
        }
    }

    public struct UpdateBotLocaleResponse: AWSDecodableShape {
        /// The identifier of the bot that contains the updated locale.
        public let botId: String?
        /// The current status of the locale. When the bot status is Built the locale is ready for use.
        public let botLocaleStatus: BotLocaleStatus?
        /// The version of the bot that contains the updated locale.
        public let botVersion: String?
        /// A timestamp of the date and time that the locale was created.
        public let creationDateTime: Date?
        /// The updated description of the locale.
        public let description: String?
        /// If the botLocaleStatus is Failed, the failureReasons field lists the errors that occurred while building the bot.
        public let failureReasons: [String]?
        /// A timestamp of the date and time that the locale was last updated.
        public let lastUpdatedDateTime: Date?
        /// The language and locale of the updated bot locale.
        public let localeId: String?
        /// The updated locale name for the locale.
        public let localeName: String?
        /// The updated confidence threshold for inserting the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents in the list of possible intents for an utterance.
        public let nluIntentConfidenceThreshold: Double?
        /// Recommended actions to take to resolve an error in the failureReasons field.
        public let recommendedActions: [String]?
        /// The updated Amazon Polly voice to use for voice interaction with the user.
        public let voiceSettings: VoiceSettings?

        public init(botId: String? = nil, botLocaleStatus: BotLocaleStatus? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil, failureReasons: [String]? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, localeName: String? = nil, nluIntentConfidenceThreshold: Double? = nil, recommendedActions: [String]? = nil, voiceSettings: VoiceSettings? = nil) {
            self.botId = botId
            self.botLocaleStatus = botLocaleStatus
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
            self.failureReasons = failureReasons
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.localeName = localeName
            self.nluIntentConfidenceThreshold = nluIntentConfidenceThreshold
            self.recommendedActions = recommendedActions
            self.voiceSettings = voiceSettings
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botLocaleStatus
            case botVersion
            case creationDateTime
            case description
            case failureReasons
            case lastUpdatedDateTime
            case localeId
            case localeName
            case nluIntentConfidenceThreshold
            case recommendedActions
            case voiceSettings
        }
    }

    public struct UpdateBotRecommendationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botRecommendationId", location: .uri("botRecommendationId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The unique identifier of the bot containing the bot recommendation to be updated.
        public let botId: String
        /// The unique identifier of the bot recommendation to be updated.
        public let botRecommendationId: String
        /// The version of the bot containing the bot recommendation to be updated.
        public let botVersion: String
        /// The object representing the passwords that will be used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.
        public let encryptionSetting: EncryptionSetting
        /// The identifier of the language and locale of the bot recommendation to update. The string must match one of the supported locales. For more information, see Supported languages
        public let localeId: String

        public init(botId: String, botRecommendationId: String, botVersion: String, encryptionSetting: EncryptionSetting, localeId: String) {
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botVersion = botVersion
            self.encryptionSetting = encryptionSetting
            self.localeId = localeId
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, max: 10)
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, min: 10)
            try self.validate(self.botRecommendationId, name: "botRecommendationId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.encryptionSetting.validate(name: "\(name).encryptionSetting")
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionSetting
        }
    }

    public struct UpdateBotRecommendationResponse: AWSDecodableShape {
        /// The unique identifier of the bot containing the bot recommendation that has been updated.
        public let botId: String?
        /// The unique identifier of the bot recommendation to be updated.
        public let botRecommendationId: String?
        /// The status of the bot recommendation. If the status is Failed, then the reasons for the failure are listed in the failureReasons field.
        public let botRecommendationStatus: BotRecommendationStatus?
        /// The version of the bot containing the bot recommendation that has been updated.
        public let botVersion: String?
        /// A timestamp of the date and time that the bot recommendation was created.
        public let creationDateTime: Date?
        /// The object representing the passwords that were used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.
        public let encryptionSetting: EncryptionSetting?
        /// A timestamp of the date and time that the bot recommendation was last updated.
        public let lastUpdatedDateTime: Date?
        /// The identifier of the language and locale of the bot recommendation to update. The string must match one of the supported locales. For more information, see Supported languages
        public let localeId: String?
        /// The object representing the Amazon S3 bucket containing the transcript, as well as the associated metadata.
        public let transcriptSourceSetting: TranscriptSourceSetting?

        public init(botId: String? = nil, botRecommendationId: String? = nil, botRecommendationStatus: BotRecommendationStatus? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, encryptionSetting: EncryptionSetting? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, transcriptSourceSetting: TranscriptSourceSetting? = nil) {
            self.botId = botId
            self.botRecommendationId = botRecommendationId
            self.botRecommendationStatus = botRecommendationStatus
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.encryptionSetting = encryptionSetting
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.transcriptSourceSetting = transcriptSourceSetting
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botRecommendationId
            case botRecommendationStatus
            case botVersion
            case creationDateTime
            case encryptionSetting
            case lastUpdatedDateTime
            case localeId
            case transcriptSourceSetting
        }
    }

    public struct UpdateBotRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId"))
        ]

        /// The unique identifier of the bot to update. This identifier is returned by the CreateBot operation.
        public let botId: String
        /// The new name of the bot. The name must be unique in the account that creates the bot.
        public let botName: String
        /// Provides information on additional privacy protections Amazon Lex should use with the bot's data.
        public let dataPrivacy: DataPrivacy
        /// A description of the bot.
        public let description: String?
        /// The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout. You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.
        public let idleSessionTTLInSeconds: Int
        /// The Amazon Resource Name (ARN) of an IAM role that has permissions to access the bot.
        public let roleArn: String

        public init(botId: String, botName: String, dataPrivacy: DataPrivacy, description: String? = nil, idleSessionTTLInSeconds: Int, roleArn: String) {
            self.botId = botId
            self.botName = botName
            self.dataPrivacy = dataPrivacy
            self.description = description
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botName, name: "botName", parent: name, max: 100)
            try self.validate(self.botName, name: "botName", parent: name, min: 1)
            try self.validate(self.botName, name: "botName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.idleSessionTTLInSeconds, name: "idleSessionTTLInSeconds", parent: name, max: 86400)
            try self.validate(self.idleSessionTTLInSeconds, name: "idleSessionTTLInSeconds", parent: name, min: 60)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 32)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws:iam::[0-9]{12}:role/.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case botName
            case dataPrivacy
            case description
            case idleSessionTTLInSeconds
            case roleArn
        }
    }

    public struct UpdateBotResponse: AWSDecodableShape {
        /// The unique identifier of the bot that was updated.
        public let botId: String?
        /// The name of the bot after the update.
        public let botName: String?
        /// Shows the current status of the bot. The bot is first in the Creating status. Once the bot is read for use, it changes to the Available status. After the bot is created, you can use the DRAFT version of the bot.
        public let botStatus: BotStatus?
        /// A timestamp of the date and time that the bot was created.
        public let creationDateTime: Date?
        /// The data privacy settings for the bot after the update.
        public let dataPrivacy: DataPrivacy?
        /// The description of the bot after the update.
        public let description: String?
        /// The session timeout, in seconds, for the bot after the update.
        public let idleSessionTTLInSeconds: Int?
        /// A timestamp of the date and time that the bot was last updated.
        public let lastUpdatedDateTime: Date?
        /// The Amazon Resource Name (ARN) of the IAM role used by the bot after the update.
        public let roleArn: String?

        public init(botId: String? = nil, botName: String? = nil, botStatus: BotStatus? = nil, creationDateTime: Date? = nil, dataPrivacy: DataPrivacy? = nil, description: String? = nil, idleSessionTTLInSeconds: Int? = nil, lastUpdatedDateTime: Date? = nil, roleArn: String? = nil) {
            self.botId = botId
            self.botName = botName
            self.botStatus = botStatus
            self.creationDateTime = creationDateTime
            self.dataPrivacy = dataPrivacy
            self.description = description
            self.idleSessionTTLInSeconds = idleSessionTTLInSeconds
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botName
            case botStatus
            case creationDateTime
            case dataPrivacy
            case description
            case idleSessionTTLInSeconds
            case lastUpdatedDateTime
            case roleArn
        }
    }

    public struct UpdateExportRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "exportId", location: .uri("exportId"))
        ]

        /// The unique identifier Amazon Lex assigned to the export.
        public let exportId: String
        /// The new password to use to encrypt the export zip archive.
        public let filePassword: String?

        public init(exportId: String, filePassword: String? = nil) {
            self.exportId = exportId
            self.filePassword = filePassword
        }

        public func validate(name: String) throws {
            try self.validate(self.exportId, name: "exportId", parent: name, max: 10)
            try self.validate(self.exportId, name: "exportId", parent: name, min: 10)
            try self.validate(self.exportId, name: "exportId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.filePassword, name: "filePassword", parent: name, max: 1024)
            try self.validate(self.filePassword, name: "filePassword", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filePassword
        }
    }

    public struct UpdateExportResponse: AWSDecodableShape {
        /// The date and time that the export was created.
        public let creationDateTime: Date?
        /// The unique identifier Amazon Lex assigned to the export.
        public let exportId: String?
        /// The status of the export. When the status is Completed the export archive is available for download.
        public let exportStatus: ExportStatus?
        /// The file format used for the files that define the resource. The TSV format is required to export a custom vocabulary only; otherwise use LexJson format.
        public let fileFormat: ImportExportFileFormat?
        /// The date and time that the export was last updated.
        public let lastUpdatedDateTime: Date?
        /// A description of the type of resource that was exported, either a bot or a bot locale.
        public let resourceSpecification: ExportResourceSpecification?

        public init(creationDateTime: Date? = nil, exportId: String? = nil, exportStatus: ExportStatus? = nil, fileFormat: ImportExportFileFormat? = nil, lastUpdatedDateTime: Date? = nil, resourceSpecification: ExportResourceSpecification? = nil) {
            self.creationDateTime = creationDateTime
            self.exportId = exportId
            self.exportStatus = exportStatus
            self.fileFormat = fileFormat
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.resourceSpecification = resourceSpecification
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime
            case exportId
            case exportStatus
            case fileFormat
            case lastUpdatedDateTime
            case resourceSpecification
        }
    }

    public struct UpdateIntentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "intentId", location: .uri("intentId")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId"))
        ]

        /// The identifier of the bot that contains the intent.
        public let botId: String
        /// The version of the bot that contains the intent. Must be DRAFT.
        public let botVersion: String
        /// The new description of the intent.
        public let description: String?
        /// The new Lambda function to use between each turn of the conversation with the bot.
        public let dialogCodeHook: DialogCodeHookSettings?
        /// The new Lambda function to call when all of the intents required slots are provided and the intent is ready for fulfillment.
        public let fulfillmentCodeHook: FulfillmentCodeHookSettings?
        public let initialResponseSetting: InitialResponseSetting?
        /// A new list of contexts that must be active in order for Amazon Lex to consider the intent.
        public let inputContexts: [InputContext]?
        /// The new response that Amazon Lex sends the user when the intent is closed.
        public let intentClosingSetting: IntentClosingSetting?
        /// New prompts that Amazon Lex sends to the user to confirm the completion of an intent.
        public let intentConfirmationSetting: IntentConfirmationSetting?
        /// The unique identifier of the intent to update.
        public let intentId: String
        /// The new name for the intent.
        public let intentName: String
        /// New configuration settings for connecting to an Amazon Kendra index.
        public let kendraConfiguration: KendraConfiguration?
        /// The identifier of the language and locale where this intent is used. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// A new list of contexts that Amazon Lex activates when the intent is fulfilled.
        public let outputContexts: [OutputContext]?
        /// The signature of the new built-in intent to use as the parent of this intent.
        public let parentIntentSignature: String?
        /// New utterances used to invoke the intent.
        public let sampleUtterances: [SampleUtterance]?
        /// A new list of slots and their priorities that are contained by the intent.
        public let slotPriorities: [SlotPriority]?

        public init(botId: String, botVersion: String, description: String? = nil, dialogCodeHook: DialogCodeHookSettings? = nil, fulfillmentCodeHook: FulfillmentCodeHookSettings? = nil, initialResponseSetting: InitialResponseSetting? = nil, inputContexts: [InputContext]? = nil, intentClosingSetting: IntentClosingSetting? = nil, intentConfirmationSetting: IntentConfirmationSetting? = nil, intentId: String, intentName: String, kendraConfiguration: KendraConfiguration? = nil, localeId: String, outputContexts: [OutputContext]? = nil, parentIntentSignature: String? = nil, sampleUtterances: [SampleUtterance]? = nil, slotPriorities: [SlotPriority]? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.description = description
            self.dialogCodeHook = dialogCodeHook
            self.fulfillmentCodeHook = fulfillmentCodeHook
            self.initialResponseSetting = initialResponseSetting
            self.inputContexts = inputContexts
            self.intentClosingSetting = intentClosingSetting
            self.intentConfirmationSetting = intentConfirmationSetting
            self.intentId = intentId
            self.intentName = intentName
            self.kendraConfiguration = kendraConfiguration
            self.localeId = localeId
            self.outputContexts = outputContexts
            self.parentIntentSignature = parentIntentSignature
            self.sampleUtterances = sampleUtterances
            self.slotPriorities = slotPriorities
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.fulfillmentCodeHook?.validate(name: "\(name).fulfillmentCodeHook")
            try self.initialResponseSetting?.validate(name: "\(name).initialResponseSetting")
            try self.inputContexts?.forEach {
                try $0.validate(name: "\(name).inputContexts[]")
            }
            try self.validate(self.inputContexts, name: "inputContexts", parent: name, max: 5)
            try self.intentClosingSetting?.validate(name: "\(name).intentClosingSetting")
            try self.intentConfirmationSetting?.validate(name: "\(name).intentConfirmationSetting")
            try self.validate(self.intentId, name: "intentId", parent: name, max: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, min: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.intentName, name: "intentName", parent: name, max: 100)
            try self.validate(self.intentName, name: "intentName", parent: name, min: 1)
            try self.validate(self.intentName, name: "intentName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.kendraConfiguration?.validate(name: "\(name).kendraConfiguration")
            try self.outputContexts?.forEach {
                try $0.validate(name: "\(name).outputContexts[]")
            }
            try self.validate(self.outputContexts, name: "outputContexts", parent: name, max: 10)
            try self.slotPriorities?.forEach {
                try $0.validate(name: "\(name).slotPriorities[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case dialogCodeHook
            case fulfillmentCodeHook
            case initialResponseSetting
            case inputContexts
            case intentClosingSetting
            case intentConfirmationSetting
            case intentName
            case kendraConfiguration
            case outputContexts
            case parentIntentSignature
            case sampleUtterances
            case slotPriorities
        }
    }

    public struct UpdateIntentResponse: AWSDecodableShape {
        /// The identifier of the bot that contains the intent.
        public let botId: String?
        /// The version of the bot that contains the intent. Will always be DRAFT.
        public let botVersion: String?
        /// A timestamp of when the intent was created.
        public let creationDateTime: Date?
        /// The updated description of the intent.
        public let description: String?
        /// The updated Lambda function called during each turn of the conversation with the user.
        public let dialogCodeHook: DialogCodeHookSettings?
        /// The updated Lambda function called when the intent is ready for fulfillment.
        public let fulfillmentCodeHook: FulfillmentCodeHookSettings?
        public let initialResponseSetting: InitialResponseSetting?
        /// The updated list of contexts that must be active for the intent to be considered by Amazon Lex.
        public let inputContexts: [InputContext]?
        /// The updated response that Amazon Lex sends the user when the intent is closed.
        public let intentClosingSetting: IntentClosingSetting?
        /// The updated prompts that Amazon Lex sends to the user to confirm the completion of an intent.
        public let intentConfirmationSetting: IntentConfirmationSetting?
        /// The identifier of the intent that was updated.
        public let intentId: String?
        /// The updated name of the intent.
        public let intentName: String?
        /// The updated configuration for connecting to an Amazon Kendra index with the AMAZON.KendraSearchIntent intent.
        public let kendraConfiguration: KendraConfiguration?
        /// A timestamp of the last time that the intent was modified.
        public let lastUpdatedDateTime: Date?
        /// The updated language and locale of the intent.
        public let localeId: String?
        /// The updated list of contexts that Amazon Lex activates when the intent is fulfilled.
        public let outputContexts: [OutputContext]?
        /// The updated built-in intent that is the parent of this intent.
        public let parentIntentSignature: String?
        /// The updated list of sample utterances for the intent.
        public let sampleUtterances: [SampleUtterance]?
        /// The updated list of slots and their priorities that are elicited from the user for the intent.
        public let slotPriorities: [SlotPriority]?

        public init(botId: String? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil, dialogCodeHook: DialogCodeHookSettings? = nil, fulfillmentCodeHook: FulfillmentCodeHookSettings? = nil, initialResponseSetting: InitialResponseSetting? = nil, inputContexts: [InputContext]? = nil, intentClosingSetting: IntentClosingSetting? = nil, intentConfirmationSetting: IntentConfirmationSetting? = nil, intentId: String? = nil, intentName: String? = nil, kendraConfiguration: KendraConfiguration? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, outputContexts: [OutputContext]? = nil, parentIntentSignature: String? = nil, sampleUtterances: [SampleUtterance]? = nil, slotPriorities: [SlotPriority]? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
            self.dialogCodeHook = dialogCodeHook
            self.fulfillmentCodeHook = fulfillmentCodeHook
            self.initialResponseSetting = initialResponseSetting
            self.inputContexts = inputContexts
            self.intentClosingSetting = intentClosingSetting
            self.intentConfirmationSetting = intentConfirmationSetting
            self.intentId = intentId
            self.intentName = intentName
            self.kendraConfiguration = kendraConfiguration
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.outputContexts = outputContexts
            self.parentIntentSignature = parentIntentSignature
            self.sampleUtterances = sampleUtterances
            self.slotPriorities = slotPriorities
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case creationDateTime
            case description
            case dialogCodeHook
            case fulfillmentCodeHook
            case initialResponseSetting
            case inputContexts
            case intentClosingSetting
            case intentConfirmationSetting
            case intentId
            case intentName
            case kendraConfiguration
            case lastUpdatedDateTime
            case localeId
            case outputContexts
            case parentIntentSignature
            case sampleUtterances
            case slotPriorities
        }
    }

    public struct UpdateResourcePolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "expectedRevisionId", location: .querystring("expectedRevisionId")),
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The identifier of the revision of the policy to update. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception. If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.
        public let expectedRevisionId: String?
        /// A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see  IAM JSON policy reference .  If the policy isn't valid, Amazon Lex returns a validation exception.
        public let policy: String
        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
        public let resourceArn: String

        public init(expectedRevisionId: String? = nil, policy: String, resourceArn: String) {
            self.expectedRevisionId = expectedRevisionId
            self.policy = policy
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, max: 5)
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, min: 1)
            try self.validate(self.expectedRevisionId, name: "expectedRevisionId", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.policy, name: "policy", parent: name, min: 2)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1011)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case policy
        }
    }

    public struct UpdateResourcePolicyResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
        public let resourceArn: String?
        /// The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.
        public let revisionId: String?

        public init(resourceArn: String? = nil, revisionId: String? = nil) {
            self.resourceArn = resourceArn
            self.revisionId = revisionId
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case revisionId
        }
    }

    public struct UpdateSlotRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "intentId", location: .uri("intentId")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId")),
            AWSMemberEncoding(label: "slotId", location: .uri("slotId"))
        ]

        /// The unique identifier of the bot that contains the slot.
        public let botId: String
        /// The version of the bot that contains the slot. Must always be DRAFT.
        public let botVersion: String
        /// The new description for the slot.
        public let description: String?
        /// The identifier of the intent that contains the slot.
        public let intentId: String
        /// The identifier of the language and locale that contains the slot. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// Determines whether the slot accepts multiple values in one response. Multiple value slots are only available in the en-US locale. If you set this value to true in any other locale, Amazon Lex throws a ValidationException. If the multipleValuesSetting is not set, the default value is false.
        public let multipleValuesSetting: MultipleValuesSetting?
        /// New settings that determine how slot values are formatted in Amazon CloudWatch logs.
        public let obfuscationSetting: ObfuscationSetting?
        /// The unique identifier for the slot to update.
        public let slotId: String
        /// The new name for the slot.
        public let slotName: String
        /// The unique identifier of the new slot type to associate with this slot.
        public let slotTypeId: String?
        /// Specifications for the constituent sub slots and the   expression for the composite slot.
        public let subSlotSetting: SubSlotSetting?
        /// A new set of prompts that Amazon Lex sends to the user to elicit a response the provides a value for the slot.
        public let valueElicitationSetting: SlotValueElicitationSetting

        public init(botId: String, botVersion: String, description: String? = nil, intentId: String, localeId: String, multipleValuesSetting: MultipleValuesSetting? = nil, obfuscationSetting: ObfuscationSetting? = nil, slotId: String, slotName: String, slotTypeId: String? = nil, subSlotSetting: SubSlotSetting? = nil, valueElicitationSetting: SlotValueElicitationSetting) {
            self.botId = botId
            self.botVersion = botVersion
            self.description = description
            self.intentId = intentId
            self.localeId = localeId
            self.multipleValuesSetting = multipleValuesSetting
            self.obfuscationSetting = obfuscationSetting
            self.slotId = slotId
            self.slotName = slotName
            self.slotTypeId = slotTypeId
            self.subSlotSetting = subSlotSetting
            self.valueElicitationSetting = valueElicitationSetting
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.validate(self.intentId, name: "intentId", parent: name, max: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, min: 10)
            try self.validate(self.intentId, name: "intentId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.slotId, name: "slotId", parent: name, max: 10)
            try self.validate(self.slotId, name: "slotId", parent: name, min: 10)
            try self.validate(self.slotId, name: "slotId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.slotName, name: "slotName", parent: name, max: 100)
            try self.validate(self.slotName, name: "slotName", parent: name, min: 1)
            try self.validate(self.slotName, name: "slotName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, max: 25)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, min: 1)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, pattern: "^((AMAZON\\.)[a-zA-Z_]+?|[0-9a-zA-Z]+)$")
            try self.subSlotSetting?.validate(name: "\(name).subSlotSetting")
            try self.valueElicitationSetting.validate(name: "\(name).valueElicitationSetting")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case multipleValuesSetting
            case obfuscationSetting
            case slotName
            case slotTypeId
            case subSlotSetting
            case valueElicitationSetting
        }
    }

    public struct UpdateSlotResponse: AWSDecodableShape {
        /// The identifier of the bot that contains the slot.
        public let botId: String?
        /// The identifier of the slot version that contains the slot. Will always be DRAFT.
        public let botVersion: String?
        /// The timestamp of the date and time that the slot was created.
        public let creationDateTime: Date?
        /// The updated description of the bot.
        public let description: String?
        /// The intent that contains the slot.
        public let intentId: String?
        /// The timestamp of the date and time that the slot was last updated.
        public let lastUpdatedDateTime: Date?
        /// The locale that contains the slot.
        public let localeId: String?
        /// Indicates whether the slot accepts multiple values in one response.
        public let multipleValuesSetting: MultipleValuesSetting?
        /// The updated setting that determines whether the slot value is obfuscated in the Amazon CloudWatch logs.
        public let obfuscationSetting: ObfuscationSetting?
        /// The unique identifier of the slot that was updated.
        public let slotId: String?
        /// The updated name of the slot.
        public let slotName: String?
        /// The updated identifier of the slot type that provides values for the slot.
        public let slotTypeId: String?
        /// Specifications for the constituent sub slots and the   expression for the composite slot.
        public let subSlotSetting: SubSlotSetting?
        /// The updated prompts that Amazon Lex sends to the user to elicit a response that provides a value for the slot.
        public let valueElicitationSetting: SlotValueElicitationSetting?

        public init(botId: String? = nil, botVersion: String? = nil, creationDateTime: Date? = nil, description: String? = nil, intentId: String? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, multipleValuesSetting: MultipleValuesSetting? = nil, obfuscationSetting: ObfuscationSetting? = nil, slotId: String? = nil, slotName: String? = nil, slotTypeId: String? = nil, subSlotSetting: SubSlotSetting? = nil, valueElicitationSetting: SlotValueElicitationSetting? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.creationDateTime = creationDateTime
            self.description = description
            self.intentId = intentId
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.multipleValuesSetting = multipleValuesSetting
            self.obfuscationSetting = obfuscationSetting
            self.slotId = slotId
            self.slotName = slotName
            self.slotTypeId = slotTypeId
            self.subSlotSetting = subSlotSetting
            self.valueElicitationSetting = valueElicitationSetting
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case creationDateTime
            case description
            case intentId
            case lastUpdatedDateTime
            case localeId
            case multipleValuesSetting
            case obfuscationSetting
            case slotId
            case slotName
            case slotTypeId
            case subSlotSetting
            case valueElicitationSetting
        }
    }

    public struct UpdateSlotTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "botId", location: .uri("botId")),
            AWSMemberEncoding(label: "botVersion", location: .uri("botVersion")),
            AWSMemberEncoding(label: "localeId", location: .uri("localeId")),
            AWSMemberEncoding(label: "slotTypeId", location: .uri("slotTypeId"))
        ]

        /// The identifier of the bot that contains the slot type.
        public let botId: String
        /// The version of the bot that contains the slot type. Must be DRAFT.
        public let botVersion: String
        /// Specifications for a composite slot type.
        public let compositeSlotTypeSetting: CompositeSlotTypeSetting?
        /// The new description of the slot type.
        public let description: String?
        public let externalSourceSetting: ExternalSourceSetting?
        /// The identifier of the language and locale that contains the slot type. The string must match one of the supported locales. For more information, see Supported languages.
        public let localeId: String
        /// The new built-in slot type that should be used as the parent of this slot type.
        public let parentSlotTypeSignature: String?
        /// The unique identifier of the slot type to update.
        public let slotTypeId: String
        /// The new name of the slot type.
        public let slotTypeName: String
        /// A new list of values and their optional synonyms that define the values that the slot type can take.
        public let slotTypeValues: [SlotTypeValue]?
        /// The strategy that Amazon Lex should use when deciding on a value from the list of slot type values.
        public let valueSelectionSetting: SlotValueSelectionSetting?

        public init(botId: String, botVersion: String, compositeSlotTypeSetting: CompositeSlotTypeSetting? = nil, description: String? = nil, externalSourceSetting: ExternalSourceSetting? = nil, localeId: String, parentSlotTypeSignature: String? = nil, slotTypeId: String, slotTypeName: String, slotTypeValues: [SlotTypeValue]? = nil, valueSelectionSetting: SlotValueSelectionSetting? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.compositeSlotTypeSetting = compositeSlotTypeSetting
            self.description = description
            self.externalSourceSetting = externalSourceSetting
            self.localeId = localeId
            self.parentSlotTypeSignature = parentSlotTypeSignature
            self.slotTypeId = slotTypeId
            self.slotTypeName = slotTypeName
            self.slotTypeValues = slotTypeValues
            self.valueSelectionSetting = valueSelectionSetting
        }

        public func validate(name: String) throws {
            try self.validate(self.botId, name: "botId", parent: name, max: 10)
            try self.validate(self.botId, name: "botId", parent: name, min: 10)
            try self.validate(self.botId, name: "botId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.botVersion, name: "botVersion", parent: name, max: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, min: 5)
            try self.validate(self.botVersion, name: "botVersion", parent: name, pattern: "^DRAFT$")
            try self.compositeSlotTypeSetting?.validate(name: "\(name).compositeSlotTypeSetting")
            try self.validate(self.description, name: "description", parent: name, max: 200)
            try self.externalSourceSetting?.validate(name: "\(name).externalSourceSetting")
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, max: 10)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, min: 10)
            try self.validate(self.slotTypeId, name: "slotTypeId", parent: name, pattern: "^[0-9a-zA-Z]+$")
            try self.validate(self.slotTypeName, name: "slotTypeName", parent: name, max: 100)
            try self.validate(self.slotTypeName, name: "slotTypeName", parent: name, min: 1)
            try self.validate(self.slotTypeName, name: "slotTypeName", parent: name, pattern: "^([0-9a-zA-Z][_-]?)+$")
            try self.slotTypeValues?.forEach {
                try $0.validate(name: "\(name).slotTypeValues[]")
            }
            try self.validate(self.slotTypeValues, name: "slotTypeValues", parent: name, max: 10000)
            try self.validate(self.slotTypeValues, name: "slotTypeValues", parent: name, min: 1)
            try self.valueSelectionSetting?.validate(name: "\(name).valueSelectionSetting")
        }

        private enum CodingKeys: String, CodingKey {
            case compositeSlotTypeSetting
            case description
            case externalSourceSetting
            case parentSlotTypeSignature
            case slotTypeName
            case slotTypeValues
            case valueSelectionSetting
        }
    }

    public struct UpdateSlotTypeResponse: AWSDecodableShape {
        /// The identifier of the bot that contains the slot type.
        public let botId: String?
        /// The version of the bot that contains the slot type. This is always DRAFT.
        public let botVersion: String?
        /// Specifications for a composite slot type.
        public let compositeSlotTypeSetting: CompositeSlotTypeSetting?
        /// The timestamp of the date and time that the slot type was created.
        public let creationDateTime: Date?
        /// The updated description of the slot type.
        public let description: String?
        public let externalSourceSetting: ExternalSourceSetting?
        /// A timestamp of the date and time that the slot type was last updated.
        public let lastUpdatedDateTime: Date?
        /// The language and locale of the updated slot type.
        public let localeId: String?
        /// The updated signature of the built-in slot type that is the parent of this slot type.
        public let parentSlotTypeSignature: String?
        /// The unique identifier of the updated slot type.
        public let slotTypeId: String?
        /// The updated name of the slot type.
        public let slotTypeName: String?
        /// The updated values that the slot type provides.
        public let slotTypeValues: [SlotTypeValue]?
        /// The updated strategy that Amazon Lex uses to determine which value to select from the slot type.
        public let valueSelectionSetting: SlotValueSelectionSetting?

        public init(botId: String? = nil, botVersion: String? = nil, compositeSlotTypeSetting: CompositeSlotTypeSetting? = nil, creationDateTime: Date? = nil, description: String? = nil, externalSourceSetting: ExternalSourceSetting? = nil, lastUpdatedDateTime: Date? = nil, localeId: String? = nil, parentSlotTypeSignature: String? = nil, slotTypeId: String? = nil, slotTypeName: String? = nil, slotTypeValues: [SlotTypeValue]? = nil, valueSelectionSetting: SlotValueSelectionSetting? = nil) {
            self.botId = botId
            self.botVersion = botVersion
            self.compositeSlotTypeSetting = compositeSlotTypeSetting
            self.creationDateTime = creationDateTime
            self.description = description
            self.externalSourceSetting = externalSourceSetting
            self.lastUpdatedDateTime = lastUpdatedDateTime
            self.localeId = localeId
            self.parentSlotTypeSignature = parentSlotTypeSignature
            self.slotTypeId = slotTypeId
            self.slotTypeName = slotTypeName
            self.slotTypeValues = slotTypeValues
            self.valueSelectionSetting = valueSelectionSetting
        }

        private enum CodingKeys: String, CodingKey {
            case botId
            case botVersion
            case compositeSlotTypeSetting
            case creationDateTime
            case description
            case externalSourceSetting
            case lastUpdatedDateTime
            case localeId
            case parentSlotTypeSignature
            case slotTypeId
            case slotTypeName
            case slotTypeValues
            case valueSelectionSetting
        }
    }

    public struct UtteranceAggregationDuration: AWSEncodableShape & AWSDecodableShape {
        /// The desired time window for aggregating utterances.
        public let relativeAggregationDuration: RelativeAggregationDuration

        public init(relativeAggregationDuration: RelativeAggregationDuration) {
            self.relativeAggregationDuration = relativeAggregationDuration
        }

        public func validate(name: String) throws {
            try self.relativeAggregationDuration.validate(name: "\(name).relativeAggregationDuration")
        }

        private enum CodingKeys: String, CodingKey {
            case relativeAggregationDuration
        }
    }

    public struct VoiceSettings: AWSEncodableShape & AWSDecodableShape {
        /// Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see the  engine parameter of the SynthesizeSpeech operation in the Amazon Polly developer guide. If you do not specify a value, the default is standard.
        public let engine: VoiceEngine?
        /// The identifier of the Amazon Polly voice to use.
        public let voiceId: String

        public init(engine: VoiceEngine? = nil, voiceId: String) {
            self.engine = engine
            self.voiceId = voiceId
        }

        private enum CodingKeys: String, CodingKey {
            case engine
            case voiceId
        }
    }

    public struct WaitAndContinueSpecification: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether the bot will wait for a user to respond. When this field is false, wait and continue responses for a slot aren't used. If the active field isn't specified, the default is true.
        public let active: Bool?
        /// The response that Amazon Lex sends to indicate that the bot is ready to continue the conversation.
        public let continueResponse: ResponseSpecification
        /// A response that Amazon Lex sends periodically to the user to indicate that the bot is still waiting for input from the user.
        public let stillWaitingResponse: StillWaitingResponseSpecification?
        /// The response that Amazon Lex sends to indicate that the bot is waiting for the conversation to continue.
        public let waitingResponse: ResponseSpecification

        public init(active: Bool? = nil, continueResponse: ResponseSpecification, stillWaitingResponse: StillWaitingResponseSpecification? = nil, waitingResponse: ResponseSpecification) {
            self.active = active
            self.continueResponse = continueResponse
            self.stillWaitingResponse = stillWaitingResponse
            self.waitingResponse = waitingResponse
        }

        public func validate(name: String) throws {
            try self.continueResponse.validate(name: "\(name).continueResponse")
            try self.stillWaitingResponse?.validate(name: "\(name).stillWaitingResponse")
            try self.waitingResponse.validate(name: "\(name).waitingResponse")
        }

        private enum CodingKeys: String, CodingKey {
            case active
            case continueResponse
            case stillWaitingResponse
            case waitingResponse
        }
    }
}

// MARK: - Errors

/// Error enum for LexModelsV2
public struct LexModelsV2ErrorType: AWSErrorType {
    enum Code: String {
        case conflictException = "ConflictException"
        case internalServerException = "InternalServerException"
        case preconditionFailedException = "PreconditionFailedException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case throttlingException = "ThrottlingException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize LexModelsV2
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The action that you tried to perform couldn&#39;t be completed because the resource is in a conflicting state. For example, deleting a bot that is in the CREATING state. Try your request again.
    public static var conflictException: Self { .init(.conflictException) }
    /// The service encountered an unexpected condition. Try your request again.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// Your request couldn&#39;t be completed because one or more request fields aren&#39;t valid. Check the fields in your request and try again.
    public static var preconditionFailedException: Self { .init(.preconditionFailedException) }
    /// You asked to describe a resource that doesn&#39;t exist. Check the resource that you are requesting and try again.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// You have reached a quota for your bot.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// Your request rate is too high. Reduce the frequency of requests.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// One of the input parameters in your request isn&#39;t valid. Check the parameters and try your request again.
    public static var validationException: Self { .init(.validationException) }
}

extension LexModelsV2ErrorType: Equatable {
    public static func == (lhs: LexModelsV2ErrorType, rhs: LexModelsV2ErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension LexModelsV2ErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
